aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1997-09-16 21:46:01 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1997-09-16 21:46:01 +0000
commit92a2195e5f56a8283fe7187a49b67ef81c082b65 (patch)
treeadf595cdd9c533883ad1c32c6d38a3bd182e013c
parent9230e126aa86e2fd7a93dd8ded31f3a6513fb9b6 (diff)
downloadinitscripts-92a2195e5f56a8283fe7187a49b67ef81c082b65.tar
initscripts-92a2195e5f56a8283fe7187a49b67ef81c082b65.tar.gz
initscripts-92a2195e5f56a8283fe7187a49b67ef81c082b65.tar.bz2
initscripts-92a2195e5f56a8283fe7187a49b67ef81c082b65.tar.xz
initscripts-92a2195e5f56a8283fe7187a49b67ef81c082b65.zip
General cleanup.
Don't start devices that shouldn't be started.
-rwxr-xr-xrc.d/init.d/network12
1 files changed, 7 insertions, 5 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 09ccc604..150fa3d7 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -23,15 +23,15 @@ if [ -d /proc/sys/net/ipv4 ]; then
# people could have left this out of their kernel, which isn't
# exactly an error
if [ ! -f /proc/sys/net/ipv4/ip_forward ] ; then
- echo "/proc/sys/net/ipv4/ip_forward is missing -- cannot control IP " \
- "forwarding" >&2
+ echo "/proc/sys/net/ipv4/ip_forward is missing --" \
+ "cannot control IP forwarding" >&2
else
if [ "$FORWARD_IPV4" = "no" -o "$FORWARD_IPV4" = "false" ]; then
value=0
echo "Disabling IPv4 packet forwarding."
else
- echo "Enabling IPv4 packet forwarding."
value=1
+ echo "Enabling IPv4 packet forwarding."
fi
echo "$value" > /proc/sys/net/ipv4/ip_forward
@@ -41,11 +41,13 @@ fi
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
-[ -f /sbin/ifconfig ] || exit 0
+[ -x /sbin/ifconfig ] || exit 0
cd /etc/sysconfig/network-scripts
-interfaces=`ls ifcfg* | grep -v ifcfg-lo | grep -v :`
+# find all the interfaces besides loopback.
+# ignore aliases, alternative configurations, and editor backup files
+interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$'`
# See how we were called.
case "$1" in