From e2fad099544dc2f5cf9803e9d5edc998ae8f0f3c Mon Sep 17 00:00:00 2001 From: Alexander Langer Date: Sat, 10 Jan 1998 03:33:39 +0000 Subject: [PATCH] Compare return code from ipfw against 0 for success instead of == 1 for error. Pointed out by: Matthew Thyer --- etc/network.subr | 8 ++++---- etc/rc.d/netoptions | 8 ++++---- etc/rc.d/network1 | 8 ++++---- etc/rc.d/network2 | 8 ++++---- etc/rc.d/network3 | 8 ++++---- etc/rc.d/routing | 8 ++++---- etc/rc.network | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/etc/network.subr b/etc/network.subr index 975fbf55112..eac6f3f48ea 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -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 diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 975fbf55112..eac6f3f48ea 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -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 diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index 975fbf55112..eac6f3f48ea 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -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 diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index 975fbf55112..eac6f3f48ea 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -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 diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index 975fbf55112..eac6f3f48ea 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -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 diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 975fbf55112..eac6f3f48ea 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -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 diff --git a/etc/rc.network b/etc/rc.network index 975fbf55112..eac6f3f48ea 100644 --- a/etc/rc.network +++ b/etc/rc.network @@ -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 -- 2.45.2