summaryrefslogtreecommitdiffstats
path: root/src/connections/ethernet
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2009-09-27 14:04:28 +0200
committerJames Rayner <james@archlinux.org>2009-09-27 14:04:28 +0200
commitdce7afd6a8d4bcd6adb7f1d1b330c21fcb8c9957 (patch)
treef9675d14d4d694245751956e7fa019d3b0ca9ad3 /src/connections/ethernet
parent8b355a1e43887b67c327d5c79c488a0a673f35dc (diff)
downloadnetctl-dce7afd6a8d4bcd6adb7f1d1b330c21fcb8c9957.tar.gz
netctl-dce7afd6a8d4bcd6adb7f1d1b330c21fcb8c9957.tar.xz
Only flush when disabling wireless interface, tidy up down/forcedown
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r--src/connections/ethernet13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet
index 20ee545..a0641d0 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -40,9 +40,7 @@ ethernet_up() {
fi
if ! wpa_check "$INTERFACE"; then
- # ignore quirk nodown---is that appropriate? or should we just use report_iproute?
- # this adds a flush call as well---is that appropriate?
- bring_interface forcedown "$INTERFACE"
+ bring_interface down "$INTERFACE"
report_fail "WPA Authentication/Association Failed"
return 1
fi
@@ -145,10 +143,11 @@ ethernet_down() {
fi
report_debug ethernet_iproute_down if_down
- # ignore quirk nodown---is that appropriate?
- # this adds a flush call as well---is that appropriate?
- bring_interface forcedown "$INTERFACE"
-
+ if [[ "$CONNECTION" == "wireless" ]]; then
+ bring_interface flush "$INTERFACE"
+ else
+ bring_interface down "$INTERFACE"
+ fi
}
# Returns status of profile - is it still functional?