summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2009-02-17 02:16:33 +0100
committerJames Rayner <james@archlinux.org>2009-02-17 02:16:33 +0100
commit5955232eeb8e5d55d9c41c8bc60d058ebbc2ded9 (patch)
tree1d5e1bd9e3cc4f3af8e0bc7cc89c24ebf2d43851
parent11646867bc735d89cdc95508f30fa4277592bbfe (diff)
downloadnetctl-5955232eeb8e5d55d9c41c8bc60d058ebbc2ded9.tar.gz
netctl-5955232eeb8e5d55d9c41c8bc60d058ebbc2ded9.tar.xz
fix netcfg-auto-wireless and a temporary workaround for FS#13299
-rwxr-xr-xsrc-wireless/net-auto3
-rwxr-xr-xsrc-wireless/netcfg-auto-wireless17
-rw-r--r--src/connections/wireless8
3 files changed, 15 insertions, 13 deletions
diff --git a/src-wireless/net-auto b/src-wireless/net-auto
index a4f68b2..8b724a5 100755
--- a/src-wireless/net-auto
+++ b/src-wireless/net-auto
@@ -26,8 +26,9 @@ case "$1" in
done
;;
stop)
+ [[ ! -e /var/run/daemons/net-auto ]] && exit 0
for iface in $(cat /var/run/daemons/net-auto); do
- netcfg interface-down $iface
+ netcfg iface-down $iface
done
rm_daemon net-auto
;;
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
diff --git a/src/connections/wireless b/src/connections/wireless
index f521465..27df7ca 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -62,11 +62,11 @@ wireless_up() {
quirk "postscan" && sleep 1 && iwlist $INTERFACE scan &>/dev/null
quirk "predown" && ifconfig $INTERFACE up
- # Some devices appear to not associate until DHCP is run.
- if quirk "noacheck"; then
- sleep ${WIRELESS_TIMEOUT:-20}
- else
+ # Many devices appear to not associate until DHCP is run.
+ if quirk "acheck"; then
wep_check $INTERFACE $TIMEOUT|| return 1
+ else
+ sleep ${TIMEOUT:-15}
fi
;;
wpa)