Correct "service ipfw status" for INET6-only systems.

MFC after:	1 month
This commit is contained in:
Eugene Grosbein
2020-01-21 17:02:57 +00:00
parent b02706324a
commit 7d82194866
+3
View File
@@ -127,6 +127,9 @@ ipfw_stop()
ipfw_status()
{
status=$(sysctl -i -n net.inet.ip.fw.enable)
if afexists inet6; then
status=$(( $status + $(sysctl -i -n net.inet6.ip6.fw.enable) ))
fi
if [ ${status:-0} -eq 0 ]; then
echo "ipfw is not enabled"
exit 1