diff options
Diffstat (limited to 'src-wireless/netcfg-auto-wireless')
-rwxr-xr-x | src-wireless/netcfg-auto-wireless | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src-wireless/netcfg-auto-wireless b/src-wireless/netcfg-auto-wireless index a523bdd..e77eb0e 100755 --- a/src-wireless/netcfg-auto-wireless +++ b/src-wireless/netcfg-auto-wireless @@ -1,8 +1,8 @@ #! /bin/bash # Originally contributed by Neuro: http://bbs.archlinux.org/viewtopic.php?pid=278148#p278148 -. /usr/lib/network/network.subr -. /usr/lib/network/wireless.subr +. /usr/lib/network/network +. /usr/lib/network/wireless . /etc/rc.conf . /etc/rc.d/functions @@ -27,12 +27,13 @@ wifi_auto() while read essid; do for network in $(list_profiles); do load_profile $network - if [[ "$CONNECTION" = "wireless" && "$essid" = "$ESSID" && "$interface" = "$INTERFACE" ]]; then - found=$network - fi - # Clear out any variables set by the profile - . /usr/lib/network/${CONNECTION}.subr - ${CONNECTION}_clean_scope + case "$CONNECTION" in + wireless-old|wireless|wireless-dbus) + if [[ "$essid" = "$ESSID" && "$interface" = "$INTERFACE" ]]; then + found=$network + fi + ;; + esac done done < $networks |