[BUG] wpa_cli can't acces ctrl_interface if using wpa_supplicant at .service

Timofey Titovets nefelim4ag at gmail.com
Sat Aug 9 14:31:50 EDT 2014


2014-08-09 21:29 GMT+03:00 Timofey Titovets <nefelim4ag at gmail.com>:
> I create https://wiki.archlinux.org/index.php/Systemd-networkd#Basic_WiFi_DHCP_network
> And after, i try to use wpa_cli or wpa_gui, its not working, because:
> in /usr/lib/systemd/system/wpa_supplicant at .service
> /usr/bin/wpa_supplicant starting without -B arg.
>
> I change service file, and after, all working fine (change Type to
> forking, because -B):
> [Unit]
> Description=WPA supplicant daemon (interface-specific version)
> Requires=sys-subsystem-net-devices-%i.device
> After=sys-subsystem-net-devices-%i.device
>
> # NetworkManager users will probably want the dbus version instead.
>
> [Service]
> Type=forking
> ExecStart=/usr/bin/wpa_supplicant -B
> -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
>
> [Install]
> Alias=multi-user.target.wants/wpa_supplicant@%i.service
>
> --
> Best regards,
> Timofey.

patch:
------------
diff --git a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
index 10e62bc..4d7c7b2 100644
--- a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
+++ b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
@@ -6,8 +6,8 @@ After=sys-subsystem-net-devices-%i.device
 # NetworkManager users will probably want the dbus version instead.

 [Service]
-Type=simple
-ExecStart=@BINDIR@/wpa_supplicant
-c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
+Type=forking
+ExecStart=@BINDIR@/wpa_supplicant -B
-c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I

 [Install]
 Alias=multi-user.target.wants/wpa_supplicant@%i.service


-- 
Best regards,
Timofey.


More information about the HostAP mailing list