diff options
author | James Rayner <james@archlinux.org> | 2007-11-19 12:32:53 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2007-11-19 12:32:53 +0100 |
commit | 38197ef003cf6b71e10606cb8745eda7bf8bbb22 (patch) | |
tree | 63d9de736fc21569d985b31fbd1f1f49555bfe63 | |
parent | bce740635a1649551b32d0d09a70e19dcedb37d3 (diff) | |
download | netctl-38197ef003cf6b71e10606cb8745eda7bf8bbb22.tar.gz netctl-38197ef003cf6b71e10606cb8745eda7bf8bbb22.tar.xz |
fixed missing ]] in wireless.subr
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/netcfg | 2 | ||||
-rw-r--r-- | src/wireless.subr | 16 |
3 files changed, 10 insertions, 10 deletions
@@ -1,5 +1,5 @@ DESTDIR= -VERSION=2.0.0 +VERSION=2.0.1 install: @@ -12,7 +12,7 @@ err() { printhl "$*" } -NETCFG_VER=2.0.0 +NETCFG_VER=2.0.1 PROFILE_DIR="/etc/network.d/" SUBR_DIR="/usr/lib/network/" STATE_DIR="/var/run/network/" diff --git a/src/wireless.subr b/src/wireless.subr index 373b22f..c1de686 100644 --- a/src/wireless.subr +++ b/src/wireless.subr @@ -8,7 +8,7 @@ wpa_check() [[ -z "$TIMEOUT" ]] && TIMEOUT=15 let timeout=0 - while [[ $timeout -ne $TIMEOUT ]; do + while [[ $timeout -ne $TIMEOUT ]]; do eval `wpa_cli status|grep wpa_state` [[ "$wpa_state" = "COMPLETED" ]] && return 0 sleep 1 @@ -28,7 +28,7 @@ wep_check() [[ -z "$TIMEOUT" ]] && TIMEOUT=15 let timeout=0 - while [[ $timeout -ne $TIMEOUT ]; do + while [[ $timeout -ne $TIMEOUT ]]; do bssid=`iwgetid $INTERFACE -ra` [[ ! "$bssid" = "00:00:00:00:00:00" ]] && return 0 sleep 1 @@ -45,7 +45,7 @@ find_essid() { INTERFACE=$1; ESSID=$2; RETRIES=4 try=0; - while [[ $try -ne $RETRIES ]; do + while [[ $try -ne $RETRIES ]]; do if iwlist $INTERFACE scan|sed "s/ESSID://g"|grep -q "\"$ESSID\""; then return 0 # network found fi @@ -90,7 +90,7 @@ start_wpa() wpa_supplicant -wB -P/var/run/wpa_supplicant_${INTERFACE}.pid -i${INTERFACE} -c $WPA_CONF $WPA_OPTS sleep 1 - if [[ ! -f /var/run/wpa_supplicant_${INTERFACE}.pid ]; then + if [[ ! -f /var/run/wpa_supplicant_${INTERFACE}.pid ]]; then err_append "wpa_supplicant did not start, possible configuration error" return 1 fi @@ -100,7 +100,7 @@ wireless_up() { load_profile $1 - if [[ ! -d /sys/class/net/$INTERFACE/wireless ]; then + if [[ ! -d /sys/class/net/$INTERFACE/wireless ]]; then err_append "Interface $INTERFACE is not a wireless interface" return 1 fi @@ -115,7 +115,7 @@ wireless_up() { eval "iwconfig $INTERFACE mode managed essid \"$ESSID\"" # Kill any lingering wpa_supplicants. - if [[ -f /var/run/wpa_supplicant_$INTERFACE.pid ]; then + if [[ -f /var/run/wpa_supplicant_$INTERFACE.pid ]]; then kill $(cat /var/run/wpa_supplicant_$INTERFACE.pid) fi @@ -130,9 +130,9 @@ wireless_up() { wep|none) # 'none' security uses iwconfig, like wep, so use same code, minus keysetting. # Use sane default if no alternative is specified - if [[ "$SECURITY" = "wep" -a "$WEP_OPTS" = "" ]; then + if [[ "$SECURITY" = "wep" -a "$WEP_OPTS" = "" ]]; then WEP_OPTS="mode managed essid \"$ESSID\" key open $KEY" - elif [[ "$SECURITY" = "none" -a "$WEP_OPTS" = "" ]; then + elif [[ "$SECURITY" = "none" -a "$WEP_OPTS" = "" ]]; then WEP_OPTS="mode managed essid \"$ESSID\"" fi |