diff options
author | James Rayner <james@archlinux.org> | 2009-08-10 12:20:12 +0200 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2009-08-10 12:20:12 +0200 |
commit | 5f43ba3cfab8851b2a380d609029b8061ae51bca (patch) | |
tree | c207b1fa3e66efdecfd6cd2da84ec5881f6b2f65 /src/connections/wireless | |
parent | 74fe64cec00d359ce98938754e9cb1b0c96e49a8 (diff) | |
download | netctl-5f43ba3cfab8851b2a380d609029b8061ae51bca.tar.gz netctl-5f43ba3cfab8851b2a380d609029b8061ae51bca.tar.xz |
merge improved find_ap/find_essid
Diffstat (limited to 'src/connections/wireless')
-rw-r--r-- | src/connections/wireless | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connections/wireless b/src/connections/wireless index 2516042..f7b4b4c 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -32,7 +32,7 @@ wireless_up() { # Check if interface exists if [[ ! -e /sys/class/net/"$INTERFACE" ]]; then - if ! echo "$INTERFACE"|grep ":"; then + if ! echo "$INTERFACE"|grep -Fq ":"; then report_fail "interface $INTERFACE does not exist" return 1 fi @@ -44,13 +44,13 @@ wireless_up() { # Most drivers (mac80211) need mode set before device is brought up # Drivers generally default to managed, but set this to be sure. - if [[ "$(iwgetid -sm $INTERFACE)" -ne "Managed" ]]; then + if [[ $(iwgetid -sm $INTERFACE) -ne Managed ]]; then report_debug wireless_up iwconfig "$INTERFACE" mode managed iwconfig $INTERFACE mode managed fi report_debug wireless_up ifup - ifconfig $INTERFACE up || return 1 + set_interface up $INTERFACE || return 1 quirk "prescan" && iwlist $INTERFACE scan &> /dev/null # bcm43xx quirk "preessid" && eval "iwconfig $INTERFACE mode managed essid \"$ESSID\"" # ipw3945 |