diff options
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index c8c8b590..1b439549 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -90,7 +90,7 @@ ip link set ${DEVICE} down # wait up to 5 seconds for device to actually come down... waited=0 -while ! check_device_down && [ "$waited" -lt 50 ] ; do +while ! check_device_down ${DEVICE} && [ "$waited" -lt 50 ] ; do usleep 10000 waited=$(($waited+1)) done diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 81f16d33..f347bcc8 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -207,10 +207,15 @@ else exit 1 fi + if [ "${DEVICE}" = "lo" ]; then + SCOPE="scope host" + else + SCOPE= + fi if ! LC_ALL=C ip addr ls ${DEVICE} | grep -q "${IPADDR}/${PREFIX}" ; then if ! ip addr add ${IPADDR}/${PREFIX} \ - brd ${BROADCAST:-+} dev ${DEVICE} ; then + brd ${BROADCAST:-+} dev ${DEVICE} ${SCOPE} ; then echo $"Error adding address ${IPADDR} for ${DEVICE}." fi fi |