From: Christian Hofstaedtler Date: Thu, 9 Dec 2010 17:16:20 +0000 (+0100) Subject: shutdown interface before reconfiguring it X-Git-Tag: v0.4.1~1 X-Git-Url: http://git.grml.org/?p=grml-network.git;a=commitdiff_plain;h=77958efbab0938991b019108e77ccc08751f4c81 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. --- 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