aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1998-05-02 21:37:53 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1998-05-02 21:37:53 +0000
commitb7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58 (patch)
tree2d1fdbf73df6a9e44d3510e3aef77c7421a50d8f /rc.d/init.d
parent7da45feaa8f70f28fc1278f22bcd07956517964d (diff)
downloadinitscripts-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')
-rwxr-xr-xrc.d/init.d/network22
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
;;