diff options
author | James Rayner <james@archlinux.org> | 2009-08-10 10:10:19 +0200 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2009-08-10 10:10:19 +0200 |
commit | 65c7253e9f27421e61c0764dcf8843797611db00 (patch) | |
tree | c0bb007e5759d755f9a9f718006a15b4126790e8 /src | |
parent | 6a019f77f23fc9d214d1a1679f90606a31396184 (diff) | |
download | netctl-65c7253e9f27421e61c0764dcf8843797611db00.tar.gz netctl-65c7253e9f27421e61c0764dcf8843797611db00.tar.xz |
Add wireless+iproute support, extend wait for some slower cards
Diffstat (limited to 'src')
-rw-r--r-- | src/connections/ethernet | 2 | ||||
-rw-r--r-- | src/connections/ethernet-iproute | 2 | ||||
-rw-r--r-- | src/connections/wireless | 12 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index 38b341c..006dd42 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -12,7 +12,7 @@ ethernet_up() { fi ip link set $INTERFACE up - sleep 1 + sleep 2 if ip link show $INTERFACE|grep -q "NO-CARRIER"; then err_append "No connection" diff --git a/src/connections/ethernet-iproute b/src/connections/ethernet-iproute index a6c4804..3d5f5d3 100644 --- a/src/connections/ethernet-iproute +++ b/src/connections/ethernet-iproute @@ -19,7 +19,7 @@ ethernet_up() { fi ip link set $INTERFACE up - sleep 1 + sleep 2 if ip link show $INTERFACE|grep -q "NO-CARRIER"; then err_append "No connection" diff --git a/src/connections/wireless b/src/connections/wireless index 7394a20..0fcf56e 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -122,7 +122,9 @@ wireless_up() { ;; esac - if ! ${CONN_DIR}/ethernet up $1; then + conn=ethernet + checkyesno ${IPROUTE:-no} && conn=ethernet-iproute + if ! ${CONN_DIR}/$conn up $1; then wireless_down $1 YES return 1 fi @@ -131,9 +133,11 @@ wireless_up() { wireless_down() { load_profile $1 . ${SUBR_DIR}/8021x - PROFILE=$1 NOETHERNETDOWN=$2 - if ! checkyesno $2; then - ${CONN_DIR}/ethernet down $1 + PROFILE=$1 NOETHERNETDOWN=$2 + if ! checkyesno $NOETHERNETDOWN; then + conn=ethernet + checkyesno ${IPROUTE:-no} && conn=ethernet-iproute + $CONN_DIR/$conn down $1 fi stop_wpa $INTERFACE [[ "$SECURITY" == "wpa" ]] && rm -f "/tmp/wpa.${1// /}" # remove wpa config |