summaryrefslogtreecommitdiffstats
path: root/src/8021x
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-05-16 15:50:41 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-05-16 19:43:04 +0200
commitce28459bc22b4de1a2dc57cf4ae1cf7fdefdb356 (patch)
tree5a4192f9b48c16197fce1e86b4366b6d0ce10b86 /src/8021x
parent4c141e44b54fa80aac57c31269a25c7669054c66 (diff)
downloadnetctl-ce28459bc22b4de1a2dc57cf4ae1cf7fdefdb356.tar.gz
netctl-ce28459bc22b4de1a2dc57cf4ae1cf7fdefdb356.tar.xz
Code inspection
Some changes after reading through a few files. Only two modifications impact functionality. - Not having dhclient is now fatal for IPv6 connections that use dhcp. - Allow authentication/associaton time-out of wpa to be set through TIMEOUT for wired connections too. dhclient no longer needs to be killed manually, so those lines are removed.
Diffstat (limited to 'src/8021x')
-rw-r--r--src/8021x4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/8021x b/src/8021x
index 779e741..ceced36 100644
--- a/src/8021x
+++ b/src/8021x
@@ -6,9 +6,9 @@ wpa_check()
# CONDITION is required as wired connections are ready at ASSOCIATED not COMPLETED FS#20150
report_debug wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" status
- while [[ $timeout -lt "$TIMEOUT" ]]; do
+ while (( timeout < TIMEOUT )); do
( # Sometimes wpa_supplicant isn't ready so silence errors for 2s only to avoid hiding real errors
- if [[ $timeout -lt 2 ]]; then
+ if (( timeout < 2 )); then
eval $(wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" status 2> /dev/null | fgrep "wpa_state=")
else
eval $(wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" status | fgrep "wpa_state=")