diff options
Diffstat (limited to 'bootscripts')
-rwxr-xr-x | bootscripts/lfs/sbin/ifdown | 3 |
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 |