Skip to content

Commit

Permalink
minor fix for differing pfctl output on some devices e.g. SG-3100
Browse files Browse the repository at this point in the history
  • Loading branch information
luckman212 committed Jun 10, 2022
1 parent 92267ee commit 572e3e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stv
@@ -1,10 +1,10 @@
#!/bin/sh
#ver 1.1.1
#ver 1.1.2

_cacheupdate() {
if [ "$1" == "--force" ] || [ ! -e /tmp/stv_rulecache ]; then
echo -n "updating rule cache..."
/sbin/pfctl -vvsr | /usr/local/bin/perl -ne "print if s|^\@([0-9]+) .*? label \"(USER_RULE: )?(.*?)\".*$|\1\t\3|p" >/tmp/stv_rulecache
/sbin/pfctl -vvsr | /usr/local/bin/perl -ne "print if s|^\@([0-9]+).*? label \"(USER_RULE: )?(.*?)\".*$|\1\t\3|p" >/tmp/stv_rulecache
echo "done"
fi
}
Expand Down

0 comments on commit 572e3e5

Please sign in to comment.