aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-11 20:39:10 +0000
committerBill Nottingham <notting@redhat.com>2005-04-11 20:39:10 +0000
commitb469474fe287d3e2ebfb87e2613e46970f647f37 (patch)
tree54fbc40eea951b17968d3b954e0d99055321fac2 /sysconfig
parent6dc19469aa7271ad8458bcce6e636fbfb4c1e276 (diff)
downloadinitscripts-b469474fe287d3e2ebfb87e2613e46970f647f37.tar
initscripts-b469474fe287d3e2ebfb87e2613e46970f647f37.tar.gz
initscripts-b469474fe287d3e2ebfb87e2613e46970f647f37.tar.bz2
initscripts-b469474fe287d3e2ebfb87e2613e46970f647f37.tar.xz
initscripts-b469474fe287d3e2ebfb87e2613e46970f647f37.zip
make sure commented lines are handled correctly (#154353, #114548)
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-routes6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index 1c2343e4..37b6888e 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -28,13 +28,15 @@ fi
for file in $FILES; do
if [ -f "$file" ]; then
- if egrep -q 'ADDRESS[0-9]+=' $file ; then
+ if egrep -q '^[[:space:]]*ADDRESS[0-9]+=' ; then
# new format
handle_file $file $1
else
# older format
while read line; do
- /sbin/ip route add $line
+ if [ "$line" == "${line##\#}" ]; then
+ /sbin/ip route add $line
+ fi
done < "$file"
fi
fi