diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-11 20:38:54 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-11 20:38:54 +0000 |
commit | 3add080fe67047b51e4af436d2bb60828f7ce05e (patch) | |
tree | 4a98a5ea67ce75236e13d47a329d5f0bbdd6ae9d /sysconfig | |
parent | 4f709c7bd8bf91d0af31915cd7cfff81ac56c71d (diff) | |
download | initscripts-3add080fe67047b51e4af436d2bb60828f7ce05e.tar initscripts-3add080fe67047b51e4af436d2bb60828f7ce05e.tar.gz initscripts-3add080fe67047b51e4af436d2bb60828f7ce05e.tar.bz2 initscripts-3add080fe67047b51e4af436d2bb60828f7ce05e.tar.xz initscripts-3add080fe67047b51e4af436d2bb60828f7ce05e.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 |