summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2007-11-19 12:32:53 +0100
committerJames Rayner <james@archlinux.org>2007-11-19 12:32:53 +0100
commit38197ef003cf6b71e10606cb8745eda7bf8bbb22 (patch)
tree63d9de736fc21569d985b31fbd1f1f49555bfe63 /src
parentbce740635a1649551b32d0d09a70e19dcedb37d3 (diff)
downloadnetctl-38197ef003cf6b71e10606cb8745eda7bf8bbb22.tar.gz
netctl-38197ef003cf6b71e10606cb8745eda7bf8bbb22.tar.xz
fixed missing ]] in wireless.subr
Diffstat (limited to 'src')
-rw-r--r--src/netcfg2
-rw-r--r--src/wireless.subr16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/netcfg b/src/netcfg
index 65cfc55..c82c8b5 100644
--- a/src/netcfg
+++ b/src/netcfg
@@ -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