aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-02-04 02:19:20 +0000
committerBill Nottingham <notting@redhat.com>2003-02-04 02:19:20 +0000
commit6d46cedaad0acbdb6dd650f7c7d19af4b19d3bff (patch)
tree07a4fe99518a53ba17ba871ebe2d9651b917158c /sysconfig/network-scripts/ifup
parentf1d0cc482fd5e6376275e6cc4103292bbb2bc17d (diff)
downloadinitscripts-6d46cedaad0acbdb6dd650f7c7d19af4b19d3bff.tar
initscripts-6d46cedaad0acbdb6dd650f7c7d19af4b19d3bff.tar.gz
initscripts-6d46cedaad0acbdb6dd650f7c7d19af4b19d3bff.tar.bz2
initscripts-6d46cedaad0acbdb6dd650f7c7d19af4b19d3bff.tar.xz
initscripts-6d46cedaad0acbdb6dd650f7c7d19af4b19d3bff.zip
vlan fixes (<tis@foobar.fi>)
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup25
1 files changed, 14 insertions, 11 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index b54abe43..73e4e805 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -62,17 +62,19 @@ else
ISALIAS=no
fi
+# Ethernet 802.1Q VLAN support
if [ -x /sbin/vconfig -a "${VLAN}" = "yes" ]; then
- # 802.1q VLAN
if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q 'eth[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' ; then
- [ -d /proc/net/vlan ] || modprobe 8021q >/dev/null 2>&1 || {
- echo $"No 802.1Q VLAN support available in kernel."
- echo $"Error initializing device ${DEVICE}"
- logger -p daemon.info -t ifup \
- $"No 802.1Q VLAN support available in kernel for device ${DEVICE}"
- exit 1
- }
-
+ if [ ! -d /proc/net/vlan ]; then
+ if modprobe 8021q >/dev/null 2>&1 ; then
+ /sbin/vconfig set_name_type DEV_PLUS_VID_NO_PAD >/dev/null 2>&1 || {
+ echo $"Could not set 802.1Q VLAN parameters."
+ }
+ else
+ echo $"No 802.1Q VLAN support available in kernel for device ${DEVICE}"
+ exit 1
+ fi
+ fi
VID="`echo ${DEVICE} | \
LANG=C egrep 'eth[0-9]+\.[0-9][0-9]?[0-9]?[0-9]?$' | \
LANG=C sed 's/^[a-z0-9]*\.//g;s/^0*//'`"
@@ -90,8 +92,9 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "yes" ]; then
}
# Link on Physical device needs to be up but no ip required
- ip addr add 0.0.0.0/32 dev ${PHYSDEV}
- ip -o link set dev ${PHYSDEV} up
+ check_device_down ${PHYSDEV} && {
+ ip -o link set dev ${PHYSDEV} up
+ }
if [ ! -f /proc/net/vlan/${DEVICE} ]; then
/sbin/vconfig add ${PHYSDEV} ${VID} || {