diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-10-15 09:59:10 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-10-27 13:37:29 +0100 |
commit | 78cbc202ad90ffc9256bfd3b45c423eeff0e97b5 (patch) | |
tree | e7d331a8002580556cdd2a9ce925acd1f35294bc /sysconfig | |
parent | 2a31b3e2d30f6478896553b866cf790463b4144e (diff) | |
download | initscripts-78cbc202ad90ffc9256bfd3b45c423eeff0e97b5.tar initscripts-78cbc202ad90ffc9256bfd3b45c423eeff0e97b5.tar.gz initscripts-78cbc202ad90ffc9256bfd3b45c423eeff0e97b5.tar.bz2 initscripts-78cbc202ad90ffc9256bfd3b45c423eeff0e97b5.tar.xz initscripts-78cbc202ad90ffc9256bfd3b45c423eeff0e97b5.zip |
ifdown: clean ipv4 localhost addresses
Resolves: #1266861
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 842ed702..22c2aae5 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -106,15 +106,15 @@ retcode=0 # brought up. Flush all addresses associated with this # instance instead. if [ -d "/sys/class/net/${REALDEVICE}" ]; then - if [ "${REALDEVICE}" = "lo" ]; then - SCOPE="host" - else - SCOPE="global" - fi + LABEL= if [ "${REALDEVICE}" = "${DEVICE}" ]; then - ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null + LABEL="label ${DEVICE}" + fi + if [ "${REALDEVICE}" = "lo" ]; then + ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null else - ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null + ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null + ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null fi if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then |