diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-11 20:36:39 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-11 20:36:39 +0000 |
commit | a55728d160bb9005464cbc18950302fa3f81f7d7 (patch) | |
tree | a42403f9ccb11854e844baeeb61a1a88870b287f /sysconfig | |
parent | f0d1b10b45b53fe8590d17c10c40a21cb04eee0a (diff) | |
download | initscripts-a55728d160bb9005464cbc18950302fa3f81f7d7.tar initscripts-a55728d160bb9005464cbc18950302fa3f81f7d7.tar.gz initscripts-a55728d160bb9005464cbc18950302fa3f81f7d7.tar.bz2 initscripts-a55728d160bb9005464cbc18950302fa3f81f7d7.tar.xz initscripts-a55728d160bb9005464cbc18950302fa3f81f7d7.zip |
make sure commented lines are handled correctly (#154353, #114548)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-routes | 6 |
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 |