ipfw: fix status if ipfw.ko is not loaded
If the ipfw module is not loaded the net.inet.ip.fw.enable OID does not exist, which leads the script to report errors and incorrectly report that ipfw is enabled.
This commit is contained in:
parent
4049e18672
commit
a17b6d342c
@ -117,8 +117,8 @@ ipfw_stop()
|
||||
|
||||
ipfw_status()
|
||||
{
|
||||
status=$(sysctl -n net.inet.ip.fw.enable)
|
||||
if [ ${status} -eq 0 ]; then
|
||||
status=$(sysctl -i -n net.inet.ip.fw.enable)
|
||||
if [ ${status:-0} -eq 0 ]; then
|
||||
echo "ipfw is not enabled"
|
||||
exit 1
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user