aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-routes
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-09-25 14:56:26 +0000
committerBill Nottingham <notting@redhat.com>2007-09-25 14:56:26 +0000
commit75698769f6b5b123d16286571f6c9c792c0351af (patch)
tree5ea2252bc5f1cb171620cfa1b4693917d7b9d414 /sysconfig/network-scripts/ifdown-routes
parentc479557fc5aff54be7a44780cedede44598611d6 (diff)
downloadinitscripts-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/ifdown-routes')
-rwxr-xr-xsysconfig/network-scripts/ifdown-routes4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-routes b/sysconfig/network-scripts/ifdown-routes
index fef0ec3b..00e592f7 100755
--- a/sysconfig/network-scripts/ifdown-routes
+++ b/sysconfig/network-scripts/ifdown-routes
@@ -9,6 +9,8 @@ fi
# The routes are actually dropped just by setting the link down, so nothing
# needs to be done
+MATCH='^[[:space:]]*(\#.*)?$'
+
# Routing rules
FILES="/etc/sysconfig/network-scripts/rule-$1"
if [ -n "$2" -a "$2" != "$1" ]; then
@@ -18,7 +20,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 del $line
fi
done