From 77958efbab0938991b019108e77ccc08751f4c81 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Thu, 9 Dec 2010 18:16:20 +0100 Subject: [PATCH] shutdown interface before reconfiguring it shutting down the interface before reconfiguring it ensures that previously started dhclients and other programs exit and do not interfere with the new configuration. --- sbin/netcardconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/netcardconfig b/sbin/netcardconfig index f0429c8..37fd761 100755 --- a/sbin/netcardconfig +++ b/sbin/netcardconfig @@ -156,6 +156,8 @@ configiface() { DEVICE=${NETDEVICES[$DV]} device2props DV=$DEVICENAME + ifdown $DV + sleep 3 # wireless config WLDEVICE="$(LANG=C LC_MESSAGEWS=C iwconfig $DV 2>/dev/null | awk '/802\.11|READY|ESSID/{print $1}')" WLDEVICECOUNT="$(LANG=C LC_MESSAGEWS=C iwconfig $DV 2>/dev/null | wc -l)" @@ -578,8 +580,6 @@ while (true); do IFACEDONE="" while [ -n "$DV" -a -z "$IFACEDONE" ]; do configiface - ifdown $DV - sleep 3 if ! ifup $DV; then $DIALOG --yesno "$MESSAGE14" 15 50 || IFACEDONE="DONE" else -- 2.1.4