diff options
author | James Rayner <james@archlinux.org> | 2009-06-06 04:10:05 +0200 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2009-06-06 04:10:05 +0200 |
commit | 2f40d9375375b9820648d5ae46a60c7f06af1ccc (patch) | |
tree | 95bace4424307c853ee97c6ce5094124fa954a4c /src/connections/ethernet | |
parent | 7045f053192bae2de5445c25458b833bdc723f7e (diff) | |
download | netctl-2f40d9375375b9820648d5ae46a60c7f06af1ccc.tar.gz netctl-2f40d9375375b9820648d5ae46a60c7f06af1ccc.tar.xz |
Another attempt at a working link check, FS#13334
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r-- | src/connections/ethernet | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index 6ac3b65..e24e9f5 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -12,17 +12,12 @@ ethernet_up() { fi ip link set $INTERFACE up + sleep 1 - let timeout=0 - until ip link show $INTERFACE|grep -q "state UP" - do - sleep 0.5 - let timeout++ - if [[ $timeout -eq 5 ]]; then - err_append "No connection" - return 1 - fi - done + if ip link show $INTERFACE|grep -q "NO-CARRIER"; then + err_append "No connection" + return 1 + fi if checkyesno "${AUTH8021X:-no}"; then . "${SUBR_DIR}"/8021x |