aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 5ce3e1df..fb2d291c 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -111,15 +111,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