From 9550b3675ab99e4bc36f5606a8cd5f0037a6ed00 Mon Sep 17 00:00:00 2001 From: James Rayner Date: Mon, 16 Feb 2009 22:01:15 +1100 Subject: FS#11748 -netcfg takes interface down too early --- src/connections/ethernet | 7 +++++-- src/connections/wireless | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/connections/ethernet b/src/connections/ethernet index 042b32b..ad9e870 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -116,8 +116,11 @@ ethernet_down() { esac ifconfig $INTERFACE 0.0.0.0 - quirk "nodown" || ifconfig $INTERFACE down - + case "$CONNECTION" in + ethernet|ethernet-old) + quirk "nodown" || ifconfig $INTERFACE down + ;; + esac } ethernet_$1 $2 diff --git a/src/connections/wireless b/src/connections/wireless index 688fa98..f521465 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -118,6 +118,7 @@ wireless_down() { wpa_cli terminate &> /dev/null [[ "$SECURITY" == "wpa" ]] && rm -f "/tmp/wpa.${1// /}" # remove wpa config iwconfig $INTERFACE essid off key off &> /dev/null + ifconfig $INTERFACE down } wireless_$1 $2 -- cgit v1.2.3-24-g4f1b