diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2016-06-30 07:42:41 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-03-30 10:39:36 +0200 |
commit | 847bcf3f53fc81f1adb5b23137f97c41b75bbc0e (patch) | |
tree | d22e2a18a59c680da4640dc610a170cfe48ea13f | |
parent | a6e29b3ef3a9ba89d958ed40649cb6936c50c761 (diff) | |
download | initscripts-847bcf3f53fc81f1adb5b23137f97c41b75bbc0e.tar initscripts-847bcf3f53fc81f1adb5b23137f97c41b75bbc0e.tar.gz initscripts-847bcf3f53fc81f1adb5b23137f97c41b75bbc0e.tar.bz2 initscripts-847bcf3f53fc81f1adb5b23137f97c41b75bbc0e.tar.xz initscripts-847bcf3f53fc81f1adb5b23137f97c41b75bbc0e.zip |
ifdown-eth: we need to flush global scope as well
... but it is stuck some time
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 23038e54..7ccbddf1 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -116,7 +116,10 @@ if [ -d "/sys/class/net/${REALDEVICE}" ]; then LABEL="label ${DEVICE}" fi if [ "${REALDEVICE}" = "lo" ]; then - ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null + TIMEOUT="" + [ -x /usr/bin/timeout ] && TIMEOUT="/usr/bin/timeout --signal=SIGQUIT 4" + $TIMEOUT ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null + $TIMEOUT ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null else ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null |