aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts
diff options
context:
space:
mode:
Diffstat (limited to 'bootscripts')
-rwxr-xr-xbootscripts/lfs/sbin/ifdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/bootscripts/lfs/sbin/ifdown b/bootscripts/lfs/sbin/ifdown
index 9d556ebc8..15519c37a 100755
--- a/bootscripts/lfs/sbin/ifdown
+++ b/bootscripts/lfs/sbin/ifdown
@@ -93,7 +93,8 @@ link_status=`ip link show ${IFACE} 2>/dev/null`
if [ -n "${link_status}" ]; then
if [ "$(echo "${link_status}" | grep UP)" != "" ]; then
- if [ "$(ip addr show ${IFACE} | grep 'inet ')" != "" ]; then
+ # Set the interface down only if all IP addresses have been removed.
+ if [ "$(ip addr show ${IFACE} | grep 'inet ')" == "" ]; then
log_info_msg "Bringing down the ${IFACE} interface..."
ip link set ${IFACE} down
evaluate_retval