diff options
-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 |