From b5141c17bfc6ebfdaf440a1d997b7d897e242820 Mon Sep 17 00:00:00 2001 From: Matt Domsch Date: Thu, 10 Feb 2011 15:07:28 -0600 Subject: remove network device naming requirement from VLAN devices --- sysconfig/network-scripts/ifup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/ifup') diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 1eaabab8..d296508b 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -73,9 +73,9 @@ fi # Ethernet 802.1Q VLAN support if [ "${VLAN}" = "yes" ] && [ "$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*\([0-9]\+\)/\1/') + VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^.*\.\([0-9]\+\)/\1/') PHYSDEV=${DEVICE%.*} fi MATCH='^vlan[0-9]{1,4}?' -- cgit v1.2.1 From f662d4777625cd3bedea19cccabea7741a8b45c9 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 28 Feb 2011 16:24:01 -0500 Subject: Add GVRP support (#597598, ) --- sysconfig/network-scripts/ifup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sysconfig/network-scripts/ifup') diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index d296508b..0089f3e9 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -114,7 +114,11 @@ if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ]; then FLAG_REORDER_HDR="reorder_hdr off" fi - ip link add dev ${DEVICE} link ${PHYSDEV} type vlan id ${VID} ${FLAG_REORDER_HDR} || { + if [ "${GVRP}" = "yes" -o "${GVRP}" = "1" ]; then + FLAG_GVRP="gvrp on" + fi + + ip link add dev ${DEVICE} link ${PHYSDEV} type vlan id ${VID} ${FLAG_REORDER_HDR} ${FLAG_GVRP} || { (/usr/bin/logger -p daemon.info -t ifup \ $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" &)& echo $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" -- cgit v1.2.1 From 255a2b7db036fd4b1df99028ba6298c4b5837485 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 25 Mar 2011 16:17:16 -0400 Subject: Use net_log where appropriate. --- sysconfig/network-scripts/ifup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sysconfig/network-scripts/ifup') diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 0089f3e9..f2980b39 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -83,21 +83,21 @@ if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ]; then VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^vlan0*//') # PHYSDEV should be set in ifcfg-vlan* file if test -z "$PHYSDEV"; then - echo $"PHYSDEV should be set for device ${DEVICE}" + net_log $"PHYSDEV should be set for device ${DEVICE}" exit 1 fi fi if [ -n "$VID" ]; then if [ ! -d /proc/net/vlan ]; then if ! modprobe 8021q >/dev/null 2>&1 ; then - echo $"No 802.1Q VLAN support available in kernel for device ${DEVICE}" + net_log $"No 802.1Q VLAN support available in kernel for device ${DEVICE}" exit 1 fi fi is_available ${PHYSDEV} || { if [ "$?" = "1" ] ; then - echo $"$alias device ${DEVICE} does not seem to be present, delaying initialization." + net_log $"$alias device ${DEVICE} does not seem to be present, delaying initialization." exit 1 else exit 0 @@ -121,7 +121,7 @@ if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ]; then ip link add dev ${DEVICE} link ${PHYSDEV} type vlan id ${VID} ${FLAG_REORDER_HDR} ${FLAG_GVRP} || { (/usr/bin/logger -p daemon.info -t ifup \ $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" &)& - echo $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" + net_log $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" exit 1 } fi -- cgit v1.2.1