File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,8 @@ _is_vnet_up()
379
379
return 1 # false
380
380
elif [ ! -c /dev/pf ]; then
381
381
return 1 # false
382
+ elif pfctl -s Anchors | grep -q -F ' ^[ \t]*pot-nat$' ; then
383
+ return 1 # false
382
384
elif [ -z " $( pfctl -s nat -a pot-nat) " ]; then
383
385
return 1 # false
384
386
else
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ pot-show()
127
127
_pname=" $OPTARG "
128
128
;;
129
129
r)
130
- _running=" YES2 "
130
+ _running=" YES "
131
131
;;
132
132
a)
133
133
_all=" YES"
Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ pot-vnet-start()
74
74
# load pf module
75
75
kldload -n pf
76
76
# 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
79
79
_debug " Pot anchors are missing - load pf.conf"
80
80
pfctl -f pf.conf
81
81
fi
You can’t perform that action at this time.
0 commit comments