Compare return code from ipfw against 0 for success instead of == 1
for error. Pointed out by: Matthew Thyer <thyerm@camtech.net.au>
This commit is contained in:
parent
98baf7c8fd
commit
e2fad09954
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32382
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: rc.network,v 1.12 1997/11/07 20:45:34 sef Exp $
|
||||
# $Id: rc.network,v 1.13 1997/12/01 06:11:34 obrien Exp $
|
||||
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# Note that almost all the user-configurable behavior is no longer in
|
||||
@ -58,10 +58,10 @@ network_pass1() {
|
||||
# Initialize IP filtering using ipfw
|
||||
echo ""
|
||||
/sbin/ipfw -q flush > /dev/null 2>&1
|
||||
if [ $? = 1 ] ; then
|
||||
firewall_in_kernel=0
|
||||
else
|
||||
if [ $? = 0 ] ; then
|
||||
firewall_in_kernel=1
|
||||
else
|
||||
firewall_in_kernel=0
|
||||
fi
|
||||
|
||||
if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user