aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Domsch <Matt_Domsch@dell.com>2011-02-10 15:07:28 -0600
committerHarald Hoyer <harald@redhat.com>2011-04-19 15:28:20 +0200
commit6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73 (patch)
tree054366f5fc053307abe2fe5487ddfa813ef8f756
parentd68f9dc36eeb1c09781fa9f5a5eb377f62d845dc (diff)
downloadinitscripts-6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73.tar
initscripts-6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73.tar.gz
initscripts-6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73.tar.bz2
initscripts-6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73.tar.xz
initscripts-6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73.zip
remove network device naming requirement from VLAN devices
https://bugzilla.redhat.com/show_bug.cgi?id=462095
-rwxr-xr-xsysconfig/network-scripts/ifup7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 3f7aa394..1a18feed 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -62,12 +62,13 @@ fi
# Ethernet 802.1Q VLAN support
if [ -x /sbin/vconfig -a "${VLAN}" = "yes" -a "$ISALIAS" = "no" ]; then
VID=""
- MATCH='^(eth|hsi|bond)[0-9]+\.[0-9]{1,4}$'
+ MATCH='^.+\.[0-9]{1,4}$'
if [[ "${DEVICE}" =~ $MATCH ]]; then
- VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^[a-z0-9]*\.0*//')
+ VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^.*\.\([0-9]\+\)/\1/')
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