diff options
author | Bill Nottingham <notting@redhat.com> | 2007-09-25 14:56:26 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2007-09-25 14:56:26 +0000 |
commit | 75698769f6b5b123d16286571f6c9c792c0351af (patch) | |
tree | 5ea2252bc5f1cb171620cfa1b4693917d7b9d414 /sysconfig/network-scripts/ifup-routes | |
parent | c479557fc5aff54be7a44780cedede44598611d6 (diff) | |
download | initscripts-75698769f6b5b123d16286571f6c9c792c0351af.tar initscripts-75698769f6b5b123d16286571f6c9c792c0351af.tar.gz initscripts-75698769f6b5b123d16286571f6c9c792c0351af.tar.bz2 initscripts-75698769f6b5b123d16286571f6c9c792c0351af.tar.xz initscripts-75698769f6b5b123d16286571f6c9c792c0351af.zip |
work around bash changes (#220887, modified from <nvigier@mandriva.com>)
Diffstat (limited to 'sysconfig/network-scripts/ifup-routes')
-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 d065aaf9..83a7adc3 100755 --- a/sysconfig/network-scripts/ifup-routes +++ b/sysconfig/network-scripts/ifup-routes @@ -26,6 +26,8 @@ if [ -n "$2" -a "$2" != "$1" ]; then FILES="$FILES /etc/sysconfig/network-scripts/route-$2" fi +MATCH='^[[:space:]]*(\#.*)?$' + for file in $FILES; do if [ -f "$file" ]; then if egrep -q '^[[:space:]]*ADDRESS[0-9]+=' $file ; then @@ -34,7 +36,7 @@ for file in $FILES; do else # older format { cat "$file" ; echo ; } | while read line; do - if [[ ! "$line" =~ '^[[:space:]]*(\#.*)?$' ]]; then + if [[ ! "$line" =~ $MATCH ]]; then /sbin/ip route add $line fi done @@ -58,7 +60,7 @@ fi for file in $FILES; do if [ -f "$file" ]; then { cat "$file" ; echo ; } | while read line; do - if [[ ! "$line" =~ '^[[:space:]]*(\#.*)?$' ]]; then + if [[ ! "$line" =~ $MATCH ]]; then /sbin/ip rule add $line fi done |