diff options
Diffstat (limited to 'src/connections')
-rw-r--r-- | src/connections/ethernet | 11 | ||||
-rw-r--r-- | src/connections/ethernet-iproute | 6 | ||||
-rw-r--r-- | src/connections/wireless | 2 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index 2105ec2..86d8b96 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -12,8 +12,7 @@ ethernet_up() { fi report_debug ethernet_up ifup - ip link set $INTERFACE up - sleep 2 + set_interface up $INTERFACE if ip link show $INTERFACE|grep -q "NO-CARRIER"; then report_fail "No connection" @@ -135,13 +134,7 @@ ethernet_down() { esac report_debug ethernet_down ifdown - ifconfig $INTERFACE 0.0.0.0 - - case "$CONNECTION" in # Keep interface up for wireless - ethernet|ethernet-old) - quirk "nodown" || ifconfig $INTERFACE down - ;; - esac + set_interface down $INTERFACE } # Returns status of profile - is it still functional? diff --git a/src/connections/ethernet-iproute b/src/connections/ethernet-iproute index 75c99f3..2f0c485 100644 --- a/src/connections/ethernet-iproute +++ b/src/connections/ethernet-iproute @@ -19,8 +19,7 @@ ethernet_up() { fi report_debug ethernet_iproute_up ifup - ip link set $INTERFACE up - sleep 2 + set_interface up $INTERFACE if ip link show $INTERFACE|grep -Fq "NO-CARRIER"; then report_fail "No connection" @@ -119,8 +118,7 @@ ethernet_down() { fi report_debug ethernet_iproute_down if_down - ip addr flush $INTERFACE - quirk "nodown" || ip link set $INTERFACE down + set_interface down $INTERFACE } diff --git a/src/connections/wireless b/src/connections/wireless index f7b4b4c..10f751e 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -167,7 +167,7 @@ wireless_down() { [[ "$SECURITY" == "wpa" ]] && rm -f "/tmp/wpa.${PROFILE// /}" # remove wpa config report_debug wireless_down iwconfig "$INTERFACE" essid off key off iwconfig $INTERFACE essid off key off &> /dev/null - ifconfig $INTERFACE down + set_interface down $INTERFACE # If rfkill is specified, disable device. if [[ -n "$RFKILL_NAME" ]]; then |