diff options
author | Harald Hoyer <harald@redhat.com> | 2009-05-04 13:56:30 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2009-05-04 16:05:05 +0200 |
commit | 79a6d07f0dfc21d3ce7ebdf6fc12ecf2ea2d4b07 (patch) | |
tree | ecae67012a51f8caa6df2b75ef3c4e770ab8eba9 | |
parent | d5c0ed6c8b4b071c240672595c99e0e2b06ee2df (diff) | |
download | initscripts-79a6d07f0dfc21d3ce7ebdf6fc12ecf2ea2d4b07.tar initscripts-79a6d07f0dfc21d3ce7ebdf6fc12ecf2ea2d4b07.tar.gz initscripts-79a6d07f0dfc21d3ce7ebdf6fc12ecf2ea2d4b07.tar.bz2 initscripts-79a6d07f0dfc21d3ce7ebdf6fc12ecf2ea2d4b07.tar.xz initscripts-79a6d07f0dfc21d3ce7ebdf6fc12ecf2ea2d4b07.zip |
remove empty bridges (#463325)
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 9857a7c4..ce9ee81d 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -26,7 +26,7 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then # 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` - if LC_ALL=C /usr/sbin/brctl show | LC_ALL=C grep -q "^${BRIDGE} .*can't get port info"; then + if [ -d /sys/class/net/${BRIDGE}/brif ] && [ `ls -1 /sys/class/net/${BRIDGE}/brif | wc -l` -eq 0 ]; then /usr/sbin/brctl delbr ${BRIDGE} fi fi |