diff options
author | Matt Domsch <Matt_Domsch@dell.com> | 2011-02-10 15:07:28 -0600 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-04-19 15:28:20 +0200 |
commit | 6e42b705b9ed7cf4532d6adb5ca26b1c3ae3aa73 (patch) | |
tree | 054366f5fc053307abe2fe5487ddfa813ef8f756 | |
parent | d68f9dc36eeb1c09781fa9f5a5eb377f62d845dc (diff) | |
download | initscripts-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-x | sysconfig/network-scripts/ifup | 7 |
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 |