1 |
On Wed, Feb 11, 2015 at 11:14 AM, walt <w41ter@×××××.com> wrote: |
2 |
> |
3 |
> Yesterday I updated both systemd (218-r3) and wpa (2.3-r2) and discovered |
4 |
> the systemd unit files are not as easy to understand as they were. |
5 |
> |
6 |
> journalctl says: Job wpa_supplicant@××××××××××.service/start failed with |
7 |
> result 'dependency'. (And doesn't say what the 'dependency' is.) |
8 |
> |
9 |
> That's confusing because there is no unit file with that name. systemd is |
10 |
> apparently inserting strings like "@multi-user" in the middle of real unit |
11 |
> file names to create that log message. |
12 |
> |
13 |
> wpa_supplicant now installs more unit files than before: |
14 |
> |
15 |
> #systemctl list-unit-files | grep wpa |
16 |
> wpa_supplicant-nl80211@.service enabled |
17 |
> wpa_supplicant-wired@.service disabled |
18 |
> wpa_supplicant.service disabled |
19 |
> wpa_supplicant@.service disabled |
20 |
> |
21 |
> #cat /usr/lib64/systemd/system/wpa_supplicant-nl80211\@.service |
22 |
> [Unit] |
23 |
> Description=WPA supplicant daemon (interface- and nl80211 driver-specific |
24 |
version) |
25 |
> Requires=sys-subsystem-net-devices-%i.device |
26 |
> After=sys-subsystem-net-devices-%i.device |
27 |
> |
28 |
> [Service] |
29 |
> Type=simple |
30 |
> ExecStart=/usr/sbin/wpa_supplicant |
31 |
-c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I |
32 |
> |
33 |
> [Install] |
34 |
> Alias=multi-user.target.wants/wpa_supplicant-nl80211@%i.service |
35 |
> |
36 |
> |
37 |
> Now, if I type that ExecStart command from a bash prompt it works |
38 |
perfectly, |
39 |
> so why is systemd failing to start wpa_supplicant? I dunno. |
40 |
> |
41 |
> I'm assuming the %I stands for wlan0, so that's the way I named the conf |
42 |
file: |
43 |
> /etc/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf but maybe I'm wrong |
44 |
about |
45 |
> that? |
46 |
|
47 |
The unit files with @ in them are templates which you can instantiate with |
48 |
(usually) devices. For example, you could do: |
49 |
|
50 |
systemctl enable wpa_supplicant-nl80211@××××××.service |
51 |
systemctl enable wpa_supplicant-wired@×××××××.service |
52 |
|
53 |
And only then the %i inside the unit file becomes wlp3s0 or enp2s12. This |
54 |
is explained in "man 5 systemd.unit", search for "@". In the same man page, |
55 |
in the section SPECIFIERS, you can find what specifiers (besides %i) you |
56 |
can use. |
57 |
|
58 |
I use NetworkManager for wireless connections, and systemd-networkd for |
59 |
static ethernet, so I don't use wpa_supplicant directly. However, I would |
60 |
suggest to simply enable wpa_supplicant@××××××××××××××××××××.service. |
61 |
|
62 |
Regards. |
63 |
-- |
64 |
Canek Peláez Valdés |
65 |
Profesor de asignatura, Facultad de Ciencias |
66 |
Universidad Nacional Autónoma de México |