On Wed, Feb 11, 2015 at 11:14 AM, walt <[email protected]> wrote:
>
> Yesterday I updated both systemd (218-r3) and wpa (2.3-r2) and discovered
> the systemd unit files are not as easy to understand as they were.
>
> journalctl says: Job [email protected]/start failed with
> result 'dependency'.  (And doesn't say what the 'dependency' is.)
>
> That's confusing because there is no unit file with that name.  systemd is
> apparently inserting strings like "@multi-user" in the middle of real unit
> file names to create that log message.
>
> wpa_supplicant now installs more unit files than before:
>
> #systemctl list-unit-files | grep wpa
> [email protected]         enabled
> [email protected]           disabled
> wpa_supplicant.service                  disabled
> [email protected]                 disabled
>
> #cat /usr/lib64/systemd/system/wpa_supplicant-nl80211\@.service
> [Unit]
> Description=WPA supplicant daemon (interface- and nl80211 driver-specific
version)
> Requires=sys-subsystem-net-devices-%i.device
> After=sys-subsystem-net-devices-%i.device
>
> [Service]
> Type=simple
> ExecStart=/usr/sbin/wpa_supplicant
-c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I
>
> [Install]
> Alias=multi-user.target.wants/wpa_supplicant-nl80211@%i.service
>
>
> Now, if I type that ExecStart command from a bash prompt it works
perfectly,
> so why is systemd failing to start wpa_supplicant?  I dunno.
>
> I'm assuming the %I stands for wlan0, so that's the way I named the conf
file:
> /etc/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf but maybe I'm wrong
about
> that?

The unit files with @ in them are templates which you can instantiate with
(usually) devices. For example, you could do:

systemctl enable [email protected]
systemctl enable [email protected]

And only then the %i inside the unit file becomes wlp3s0 or enp2s12. This
is explained in "man 5 systemd.unit", search for "@". In the same man page,
in the section SPECIFIERS, you can find what specifiers (besides %i) you
can use.

I use NetworkManager for wireless connections, and systemd-networkd for
static ethernet, so I don't use wpa_supplicant directly. However, I would
suggest to simply enable [email protected].

Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México

Reply via email to