summaryrefslogtreecommitdiffstats
path: root/src-wireless
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-09-14 05:43:41 +0200
committerJames Rayner <james@archlinux.org>2009-09-14 08:24:48 +0200
commit06f6fab07786329be1d4b03a09c5af177cadd609 (patch)
treebd9cb2c57963cc77cd1e68701fe6bd3d3567f448 /src-wireless
parentf2da81ef36dcce8cfd4b841ca1677e744818b3be (diff)
downloadnetctl-06f6fab07786329be1d4b03a09c5af177cadd609.tar.gz
netctl-06f6fab07786329be1d4b03a09c5af177cadd609.tar.xz
revert regexp ESSID patches
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src-wireless')
-rw-r--r--src-wireless/netcfg-auto-wireless18
1 files changed, 6 insertions, 12 deletions
diff --git a/src-wireless/netcfg-auto-wireless b/src-wireless/netcfg-auto-wireless
index f2b934a..fe042be 100644
--- a/src-wireless/netcfg-auto-wireless
+++ b/src-wireless/netcfg-auto-wireless
@@ -27,10 +27,9 @@ wifi_auto()
# Loop through all the found essid's, then find a matching profile.
- local found_profile found_essid
+ local found_profile
# JP: add ability to use AP instead of ESSID
- # JP: also, make ESSIDs in wireless-dbus CONNECTIONS a regexp instead of a literal
while read ap essid; do
while read network; do
(
@@ -42,11 +41,7 @@ wifi_auto()
if [[ "$ap" == "$AP" ]]; then
exit 2
elif [[ -z "$found_profile" ]]; then
- if [[ "$CONNECTION" == wireless-dbus ]]; then
- if expr match "$essid" "^$ESSID\$" 1>/dev/null; then
- exit 1
- fi
- elif [[ "$essid" == "$ESSID" ]]; then
+ if [[ "$essid" == "$ESSID" ]]; then
exit 1
fi
fi
@@ -57,11 +52,10 @@ wifi_auto()
)
case $? in
2) found_profile="$network"
- found_essid="$essid"
- break 2;;
+ break 2
+ ;;
1) found_profile="$network"
- found_essid="$essid"
- ;;
+ ;;
esac
done < <(list_profiles) # avoid subshell we'd get by piping list_profiles to while read
done < "$networks" # avoid subshell; list_networks returns name of a tmp file
@@ -69,7 +63,7 @@ wifi_auto()
if [[ -n "$found_profile" ]]; then
report_success
- if profile_up "$found_profile" "$found_essid"; then # JP: now we pass literal essid to profile_up as $2
+ if profile_up "$found_profile"; then
exit 0
else
set_interface forcedown "$interface"