diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-11 20:39:01 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-11 20:39:01 +0000 |
commit | 30d3070273b550460d0a247288bcc408d2854b9d (patch) | |
tree | 487596cee039ac6eaec1882e3078b80f35df2743 | |
parent | 30c44c17944ba5a0e0cad25c06ae54d7479b4b84 (diff) | |
download | initscripts-30d3070273b550460d0a247288bcc408d2854b9d.tar initscripts-30d3070273b550460d0a247288bcc408d2854b9d.tar.gz initscripts-30d3070273b550460d0a247288bcc408d2854b9d.tar.bz2 initscripts-30d3070273b550460d0a247288bcc408d2854b9d.tar.xz initscripts-30d3070273b550460d0a247288bcc408d2854b9d.zip |
make sure commented lines are handled correctly (#154353, #114548)
-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 |