aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
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/ifup
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/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 89e963dc..3553f45b 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -68,11 +68,13 @@ fi
# Ethernet 802.1Q VLAN support
if [ -x /sbin/vconfig -a "${VLAN}" = "yes" -a "$ISALIAS" = "no" ]; then
VID=""
- if [[ "${DEVICE}" =~ '^(eth|bond)[0-9]+\.[0-9]{1,4}$' ]]; then
+ MATCH='^(eth|bond)[0-9]+\.[0-9]{1,4}$'
+ if [[ "${DEVICE}" =~ $MATCH ]]; then
VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^[a-z0-9]*\.0*//')
PHYSDEV=${DEVICE%.*}
fi
- if [[ "${DEVICE}" =~ '^vlan[0-9]{1,4}?' ]]; then
+ MATCH='^vlan[0-9]{1,4}?'
+ if [[ "${DEVICE}" =~ $MATCH ]]; then
VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^vlan0*//')
# PHYSDEV should be set in ifcfg-vlan* file
if test -z "$PHYSDEV"; then