aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorFlorian La Roche <laroche@redhat.com>2002-07-05 08:05:01 +0000
committerFlorian La Roche <laroche@redhat.com>2002-07-05 08:05:01 +0000
commit9a856ea3faac5ae432474cea7bf1e58730300169 (patch)
tree01b1bf35ac29ac02da178ed3b227830aad097085 /sysconfig
parent66447c998efe1fd53f5b18b470ff7bfa02ad5c14 (diff)
downloadinitscripts-9a856ea3faac5ae432474cea7bf1e58730300169.tar
initscripts-9a856ea3faac5ae432474cea7bf1e58730300169.tar.gz
initscripts-9a856ea3faac5ae432474cea7bf1e58730300169.tar.bz2
initscripts-9a856ea3faac5ae432474cea7bf1e58730300169.tar.xz
initscripts-9a856ea3faac5ae432474cea7bf1e58730300169.zip
- no need to source the file /etc/init.d/functions
- cleanups
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-routes25
1 files changed, 10 insertions, 15 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index 1734e9e2..657aa661 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -1,25 +1,20 @@
-#!/bin/bash
+#! /bin/bash
+#
# adds static routes which go through device $1
-. /etc/init.d/functions
-
-if [ "$1" = "" ]; then
- echo $"usage: ifup-routes <net-device>"
- exit 1
-fi
-
-if [ ! -f /etc/sysconfig/network-scripts/route-$1 ]; then
- exit 0
+if [ -z "$1" ]; then
+ echo $"usage: ifup-routes <net-device>"
+ exit 1
fi
-DEVICE=$1
+[ -f "/etc/sysconfig/network-scripts/route-$1" ] || exit 0
-# Only use the new route-DEV style.
-cat "/etc/sysconfig/network-scripts/route-$DEVICE" | while read line; do
+while read line; do
/sbin/ip route add $line
-done
+done < "/etc/sysconfig/network-scripts/route-$1"
-#grep "^$DEVICE[[:space:]]" /etc/sysconfig/static-routes | while read device args; do
+# XXX old version:
+#grep "^$1[[:space:]]" /etc/sysconfig/static-routes | while read device args; do
# /sbin/route add -$args $device
#done
#grep "^any[[:space:]]" /etc/sysconfig/static-routes | while read ignore args ; do