diff options
author | Michael K. Johnson <johnsonm@redhat.com> | 1998-05-02 21:37:53 +0000 |
---|---|---|
committer | Michael K. Johnson <johnsonm@redhat.com> | 1998-05-02 21:37:53 +0000 |
commit | b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58 (patch) | |
tree | 2d1fdbf73df6a9e44d3510e3aef77c7421a50d8f /rc.d/init.d/network | |
parent | 7da45feaa8f70f28fc1278f22bcd07956517964d (diff) | |
download | initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar.gz initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar.bz2 initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar.xz initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.zip |
linuxconf supportr3-56
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-x | rc.d/init.d/network | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 30dea69a..dcf70b91 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -33,10 +33,8 @@ cd /etc/sysconfig/network-scripts interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$' | \ sed 's/^ifcfg-//g'` - -# See how we were called. -case "$1" in - start) +ipv4_forward_set () +{ # Turn IP forwarding on or off. We do this before bringing up the # interfaces to make sure we don't forward when we shouldn't, and # we do it even if networking isn't configured (why not?). @@ -61,6 +59,13 @@ case "$1" in fi fi fi +} + + +# See how we were called. +case "$1" in + start) + ipv4_forward_set ./ifup ifcfg-lo for i in $interfaces; do @@ -100,6 +105,9 @@ case "$1" in reload) if [ -x /bin/linuxconf ] ; then eval `/bin/linuxconf --hint netdev` + if [ "$RECONF_IPV4ROUTING" = "yes" ] ; then + ipv4_forward_set + fi for device in $DEV_UP ; do ./ifup $device done @@ -123,10 +131,14 @@ case "$1" in probe) if [ -x /bin/linuxconf ] ; then eval `/bin/linuxconf --hint netdev` - [ -n "$DEV_UP$DEV_DOWN$DEV_RECONF$DEV_RECONF_ALIASES$DEV_RECONF_ROUTES" ] && \ + [ -n "$DEV_UP$DEV_DOWN$DEV_RECONF$DEV_RECONF_ALIASES" -o \ + -n "$DEV_RECONF_ROUTES" -o \ + "$RECONF_IPV4ROUTING" = yes ] && \ echo reload exit 0 else + # if linuxconf isn't around to figure stuff out for us, + # we punt. exit 0 fi ;; |