From 75698769f6b5b123d16286571f6c9c792c0351af Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 25 Sep 2007 14:56:26 +0000 Subject: work around bash changes (#220887, modified from ) --- sysconfig/network-scripts/ifup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/ifup') 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 -- cgit v1.2.1