From e7898a3c25c96f2e05bdf6a6170947a9bb67c787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Dub=C3=A9?= Date: Tue, 10 Jun 2014 15:22:11 +0200 Subject: ifdown: don't wait for aliases --- sysconfig/network-scripts/ifdown-eth | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 90442a18..45a82646 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -137,12 +137,14 @@ if [ "${TYPE}" = "Tap" ]; then tunctl -d "${DEVICE}" >/dev/null fi -# wait up to 5 seconds for device to actually come down... -waited=0 -while ! check_device_down ${DEVICE} && [ "$waited" -lt 50 ] ; do - usleep 10000 - waited=$(($waited+1)) -done +# wait up to 5 seconds for device to actually come down if it is not an alias +if [ ${DEVICE} == ${DEVICE%:*} ]; then + waited=0 + while ! check_device_down ${DEVICE} && [ "$waited" -lt 50 ] ; do + usleep 10000 + waited=$(($waited+1)) + done +fi # don't leave an outdated key sitting around if [ -n "${WIRELESS_ENC_KEY}" -a -x /sbin/iwconfig ]; then -- cgit v1.2.1