[arch-projects] [netctl] [patch] Properly terminate wpa_actiond, do not assume preexisting setting for WPADriver in netctl-auto, and clarify documentation

Leonid Isaev lisaev at umail.iu.edu
Fri Mar 8 15:06:15 EST 2013


 docs/netctl.special.7.txt | 5 +++--
 src/netctl-auto           | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/netctl.special.7.txt b/docs/netctl.special.7.txt
index 9520385..d705ac6 100644
--- a/docs/netctl.special.7.txt
+++ b/docs/netctl.special.7.txt
@@ -45,8 +45,9 @@ netctl-sleep.service::
 
 netctl-auto@<interface>.service::
     This unit issues a scan on the interface it is used for and tries to
-    start a profile for a network it finds. It is targeted to wireless
-    interfaces.
+    start a profile for a network it finds. It is targeted at wireless
+    interfaces. Notice that certain WPA-specific options (e.g. WPADriver) in
+    the profile are ignored.
 
 netctl-ifplugd@<interface>.service::
     This unit starts ifplugd on the interface it is used for. It will
diff --git a/src/netctl-auto b/src/netctl-auto
index a799b4b..b41ce14 100755
--- a/src/netctl-auto
+++ b/src/netctl-auto
@@ -49,7 +49,7 @@ case $STARTSTOP in
     done
 
     # Start the WPA supplicant
-    : ${WPADriver:=nl80211,wext}
+    WPADriver=nl80211,wext
     WPAOptions+=" -W"
     if wpa_start "$INTERFACE" "$WPADriver" "$WPA_CONF"; then
         if $AUTOWIFI -i "$INTERFACE" -P "$PIDFILE" -a "$ACTION_SCRIPT" "$@";
then @@ -60,6 +60,8 @@ case $STARTSTOP in
     exit 1
   ;;
   stop)
+    # Kill the $AUTOWIFI daemon before terminating wpa_supplicant
+    kill -term $(<$PIDFILE)
     if [[ -e $PROFILE_FILE ]]; then
         "$SUBR_DIR/network" stop "$(< "$PROFILE_FILE")" && rm -f
"$PROFILE_FILE" else


-- 
Leonid Isaev
GnuPG key: 0x164B5A6D
Fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20130308/07f5f8ca/attachment.asc>


More information about the arch-projects mailing list