Skip to content

Commit 99bf124

Browse files
committed
Minor fixes
1 parent 23f6f97 commit 99bf124

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

share/pot/common.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ _is_vnet_up()
379379
return 1 # false
380380
elif [ ! -c /dev/pf ]; then
381381
return 1 # false
382+
elif pfctl -s Anchors | grep -q -F '^[ \t]*pot-nat$' ; then
383+
return 1 # false
382384
elif [ -z "$(pfctl -s nat -a pot-nat)" ]; then
383385
return 1 # false
384386
else

share/pot/show.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pot-show()
127127
_pname="$OPTARG"
128128
;;
129129
r)
130-
_running="YES2"
130+
_running="YES"
131131
;;
132132
a)
133133
_all="YES"

share/pot/vnet-start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ pot-vnet-start()
7474
# load pf module
7575
kldload -n pf
7676
# check anchors
77-
if [ -z "$( pfctl -s Anchors | grep -F '^[ \t]*pot-nat$' )" ] ||
78-
[ -z "$( pfctl -s Anchors | grep -F '^[ \t]*pot-rdr$' )" ]; then
77+
if pfctl -s Anchors | grep -q -F '^[ \t]*pot-nat$' ||
78+
pfctl -s Anchors | grep -F '^[ \t]*pot-rdr$' ; then
7979
_debug "Pot anchors are missing - load pf.conf"
8080
pfctl -f pf.conf
8181
fi

0 commit comments

Comments
 (0)