diff options
author | Phil Sutter <psutter@redhat.com> | 2018-06-11 16:58:20 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2018-06-14 16:27:36 +0200 |
commit | bf40c2768d6b6614cc0f1b4fb68ca011489e89d3 (patch) | |
tree | aba0b4d44287db12c0cdcdfa1da5eff3568e15f1 /network-scripts/ifdown-eth | |
parent | 5a1369c0d0d589a948f05cf3f623f77cb42c28ea (diff) | |
download | initscripts-bf40c2768d6b6614cc0f1b4fb68ca011489e89d3.tar initscripts-bf40c2768d6b6614cc0f1b4fb68ca011489e89d3.tar.gz initscripts-bf40c2768d6b6614cc0f1b4fb68ca011489e89d3.tar.bz2 initscripts-bf40c2768d6b6614cc0f1b4fb68ca011489e89d3.tar.xz initscripts-bf40c2768d6b6614cc0f1b4fb68ca011489e89d3.zip |
network-scripts: Replace brctl with ip-link
Since ip-link has full support for Linux bridges (and slave ports), use
that instead of the deprecated brctl from bridge-utils.
Diffstat (limited to 'network-scripts/ifdown-eth')
-rwxr-xr-x | network-scripts/ifdown-eth | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/network-scripts/ifdown-eth b/network-scripts/ifdown-eth index 97b17aaf..c610fd20 100755 --- a/network-scripts/ifdown-eth +++ b/network-scripts/ifdown-eth @@ -135,14 +135,13 @@ if [ -d "/sys/class/net/${REALDEVICE}" ]; then fi [ "$retcode" = "0" ] && retcode=$? -if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then - /sbin/ip link set dev ${DEVICE} down - /usr/sbin/brctl delif -- ${BRIDGE} ${DEVICE} +if [ -n "${BRIDGE}" ]; then + ip link set dev ${DEVICE} nomaster down # Upon removing a device from a bridge, # it's necessary to make radvd reload its config [ -r /run/radvd/radvd.pid ] && kill -HUP $(cat /run/radvd/radvd.pid) if [ -d /sys/class/net/${BRIDGE}/brif ] && [ $(ls -1 /sys/class/net/${BRIDGE}/brif | wc -l) -eq 0 ]; then - /usr/sbin/brctl delbr -- ${BRIDGE} + ip link del ${BRIDGE} fi fi |