aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-10-10 15:08:04 +0000
committerBill Nottingham <notting@redhat.com>2003-10-10 15:08:04 +0000
commitd24c7acf6027d7539559a05ed9cc0ae7017ddc45 (patch)
treeeb2dafe2876ba1e6797e313bfe6eea30c487f43a
parentd0f96b547502b011c7867d7c0dcd8c2f42e96a1d (diff)
downloadinitscripts-d24c7acf6027d7539559a05ed9cc0ae7017ddc45.tar
initscripts-d24c7acf6027d7539559a05ed9cc0ae7017ddc45.tar.gz
initscripts-d24c7acf6027d7539559a05ed9cc0ae7017ddc45.tar.bz2
initscripts-d24c7acf6027d7539559a05ed9cc0ae7017ddc45.tar.xz
initscripts-d24c7acf6027d7539559a05ed9cc0ae7017ddc45.zip
bridging updates (#104421, <dwmw2@redhat.com>)
-rwxr-xr-xsysconfig/network-scripts/ifdown3
-rwxr-xr-xsysconfig/network-scripts/ifup25
2 files changed, 23 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index dafc25fe..d5d23c20 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -47,6 +47,9 @@ fi
if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
/sbin/ip link set dev ${DEVICE} down
/usr/sbin/brctl delif ${BRIDGE} ${DEVICE}
+ # Upon removing a device from a bridge,
+ # it's necessary to make radvd reload its config
+ [ -r /var/run/radvd/radvd.pid ] && kill -HUP `cat /var/run/radvd/radvd.pid`
exit 0
fi
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 074e0d13..fa646669 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -52,8 +52,10 @@ if [ -n "$IN_HOTPLUG" -a "${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO" ]
then
exit 0
fi
-
-[ "${TYPE}" = "Bridge" ] && exit 0
+if [ -n "$IN_HOTPLUG" -a "${TYPE}" = "Bridge" ];
+then
+ exit 0
+fi
# Ethernet 802.1Q VLAN support
if [ -x /sbin/vconfig -a "${VLAN}" = "yes" ]; then
@@ -153,10 +155,20 @@ if [ -n "${HWADDR}" ]; then
fi
fi
-if [ "${TYPE}" = "Bridge" -a -x /usr/sbin/brctl ]; then
+if [ "${TYPE}" = "Bridge" ]; then
+ if [ ! -x /usr/sbin/brctl ]; then
+ echo $"Bridge support not available: brctl not found"
+ exit 1
+ fi
/sbin/ip link set dev ${DEVICE} down 2>/dev/null
/usr/sbin/brctl delbr ${DEVICE} 2>/dev/null
- /usr/sbin/brctl addbr ${DEVICE}
+ /usr/sbin/brctl addbr ${DEVICE} 2>/dev/null
+ # brctl doesn't report success/failure (BZ #104408)
+ # Test for ourselves whether it worked.
+ if ! /usr/sbin/brctl show | LANG=C grep -q "^${DEVICE} " ; then
+ echo $"Bridge support not available in this kernel"
+ exit 1
+ fi
[ -n "${DELAY}" ] && /usr/sbin/brctl setfd ${DEVICE} ${DELAY}
[ -n "${GCINT}" ] && /usr/sbin/brctl setgcint ${DEVICE} ${GCINT}
fi
@@ -165,7 +177,10 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
/sbin/ip addr flush dev ${DEVICE} 2>/dev/null
/sbin/ip link set dev ${DEVICE} up
/usr/sbin/brctl addif ${BRIDGE} ${DEVICE}
- exit $?
+ # Upon adding a device to a bridge,
+ # it's necessary to make radvd reload its config
+ [ -r /var/run/radvd/radvd.pid ] && kill -HUP `cat /var/run/radvd/radvd.pid`
+ exit 0
fi
# now check the real state