* [gentoo-user] systemd not starting wpa_supplicant after last update
@ 2015-02-11 17:14 walt
2015-02-11 19:22 ` Canek Peláez Valdés
0 siblings, 1 reply; 9+ messages in thread
From: walt @ 2015-02-11 17:14 UTC (permalink / raw
To: gentoo-user
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 wpa_supplicant@multi-user.service/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
wpa_supplicant-nl80211@.service enabled
wpa_supplicant-wired@.service disabled
wpa_supplicant.service disabled
wpa_supplicant@.service 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?
Thanks for any clues.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] systemd not starting wpa_supplicant after last update
2015-02-11 17:14 [gentoo-user] systemd not starting wpa_supplicant after last update walt
@ 2015-02-11 19:22 ` Canek Peláez Valdés
2015-02-11 21:05 ` Neil Bothwick
0 siblings, 1 reply; 9+ messages in thread
From: Canek Peláez Valdés @ 2015-02-11 19:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2515 bytes --]
On Wed, Feb 11, 2015 at 11:14 AM, walt <w41ter@gmail.com> 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 wpa_supplicant@multi-user.service/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
> wpa_supplicant-nl80211@.service enabled
> wpa_supplicant-wired@.service disabled
> wpa_supplicant.service disabled
> wpa_supplicant@.service 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 wpa_supplicant-nl80211@wlp3s0.service
systemctl enable wpa_supplicant-wired@enp2s12.service
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 wpa_supplicant@your-wireless-device.service.
Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México
[-- Attachment #2: Type: text/html, Size: 2971 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] systemd not starting wpa_supplicant after last update
2015-02-11 19:22 ` Canek Peláez Valdés
@ 2015-02-11 21:05 ` Neil Bothwick
2015-02-11 22:37 ` [gentoo-user] " walt
0 siblings, 1 reply; 9+ messages in thread
From: Neil Bothwick @ 2015-02-11 21:05 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
On Wed, 11 Feb 2015 13:22:13 -0600, Canek Peláez Valdés wrote:
> 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
> wpa_supplicant@your-wireless-device.service.
I have it set up like this
% cat /etc/systemd/network/20-wlan0.network
[Match]
Name=wlan0
[Network]
Description=Wireless network
DHCP=yes
% ls -l /etc/systemd/system/systemd-networkd.service.wants/
systemd-resolved.service -> /usr/lib/systemd/system/systemd-resolved.service
wpa_supplicant@wlan0.service -> /usr/lib64/systemd/system/wpa_supplicant@.service
--
Neil Bothwick
Puritanism: The haunting fear that someone, somewhere may be happy.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: systemd not starting wpa_supplicant after last update
2015-02-11 21:05 ` Neil Bothwick
@ 2015-02-11 22:37 ` walt
2015-02-11 23:20 ` Rich Freeman
2015-02-12 1:29 ` Neil Bothwick
0 siblings, 2 replies; 9+ messages in thread
From: walt @ 2015-02-11 22:37 UTC (permalink / raw
To: gentoo-user
On 02/11/2015 01:05 PM, Neil Bothwick wrote:
> On Wed, 11 Feb 2015 13:22:13 -0600, Canek Peláez Valdés wrote:
>
>> 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
>> wpa_supplicant@your-wireless-device.service.
>
> I have it set up like this
>
> % cat /etc/systemd/network/20-wlan0.network
> [Match]
> Name=wlan0
>
> [Network]
> Description=Wireless network
> DHCP=yes
>
>
> % ls -l /etc/systemd/system/systemd-networkd.service.wants/
> systemd-resolved.service -> /usr/lib/systemd/system/systemd-resolved.service
> wpa_supplicant@wlan0.service -> /usr/lib64/systemd/system/wpa_supplicant@.service
Yes, thank you! Did you use systemctl to make all the symlinks? I just did it
all manually and it works, but I'm not sure how I would have done it using systemctl.
I just discovered I needed to create a symlink from /run/systemd/resolve/resolv.conf
to /etc/resolv.conf. Had to resort to reading a man page :(
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: systemd not starting wpa_supplicant after last update
2015-02-11 22:37 ` [gentoo-user] " walt
@ 2015-02-11 23:20 ` Rich Freeman
2015-02-11 23:37 ` walt
2015-02-12 1:29 ` Neil Bothwick
1 sibling, 1 reply; 9+ messages in thread
From: Rich Freeman @ 2015-02-11 23:20 UTC (permalink / raw
To: gentoo-user
On Wed, Feb 11, 2015 at 5:37 PM, walt <w41ter@gmail.com> wrote:
>
> Yes, thank you! Did you use systemctl to make all the symlinks? I just did it
> all manually and it works, but I'm not sure how I would have done it using systemctl.
>
systemctl enable <service>
That looks in the unit's install section to see what target it should
be associated with. This is actually a nice feature - with openrc it
wasn't always obvious when things should go in the boot vs default
runlevel, etc. But, all that command does is create the symlinks in
the target.wants directory, so you can just create those yourself if
you want to. That actually works for anything - you can effectively
add a dependency to a unit by creating a directory of the appropriate
name and symlinking the dependency inside.
--
Rich
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: systemd not starting wpa_supplicant after last update
2015-02-11 23:20 ` Rich Freeman
@ 2015-02-11 23:37 ` walt
2015-02-12 0:30 ` Rich Freeman
0 siblings, 1 reply; 9+ messages in thread
From: walt @ 2015-02-11 23:37 UTC (permalink / raw
To: gentoo-user
On 02/11/2015 03:20 PM, Rich Freeman wrote:
> On Wed, Feb 11, 2015 at 5:37 PM, walt <w41ter@gmail.com> wrote:
>>
>> Yes, thank you! Did you use systemctl to make all the symlinks? I just did it
>> all manually and it works, but I'm not sure how I would have done it using systemctl.
>>
>
> systemctl enable <service>
>
> That looks in the unit's install section to see what target it should
> be associated with. This is actually a nice feature - with openrc it
> wasn't always obvious when things should go in the boot vs default
> runlevel, etc. But, all that command does is create the symlinks in
> the target.wants directory, so you can just create those yourself if
> you want to. That actually works for anything - you can effectively
> add a dependency to a unit by creating a directory of the appropriate
> name and symlinking the dependency inside.
The symlink that was puzzling me is this one:
wpa_supplicant@wlan0.service -> /usr/lib64/systemd/system/wpa_supplicant@.service
The name of the symlink is not the same as the .service file it points to.
Is there a systemctl command that would do that for me?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: systemd not starting wpa_supplicant after last update
2015-02-11 23:37 ` walt
@ 2015-02-12 0:30 ` Rich Freeman
2015-02-12 1:23 ` walt
0 siblings, 1 reply; 9+ messages in thread
From: Rich Freeman @ 2015-02-12 0:30 UTC (permalink / raw
To: gentoo-user
On Wed, Feb 11, 2015 at 6:37 PM, walt <w41ter@gmail.com> wrote:
> On 02/11/2015 03:20 PM, Rich Freeman wrote:
>> On Wed, Feb 11, 2015 at 5:37 PM, walt <w41ter@gmail.com> wrote:
>>>
>>> Yes, thank you! Did you use systemctl to make all the symlinks? I just did it
>>> all manually and it works, but I'm not sure how I would have done it using systemctl.
>>>
>>
>> systemctl enable <service>
>>
>> That looks in the unit's install section to see what target it should
>> be associated with. This is actually a nice feature - with openrc it
>> wasn't always obvious when things should go in the boot vs default
>> runlevel, etc. But, all that command does is create the symlinks in
>> the target.wants directory, so you can just create those yourself if
>> you want to. That actually works for anything - you can effectively
>> add a dependency to a unit by creating a directory of the appropriate
>> name and symlinking the dependency inside.
>
> The symlink that was puzzling me is this one:
>
> wpa_supplicant@wlan0.service -> /usr/lib64/systemd/system/wpa_supplicant@.service
>
> The name of the symlink is not the same as the .service file it points to.
> Is there a systemctl command that would do that for me?
systemctl enable wpa_supplicant@wlan0
That is an instanced service. It is a bit like creating a symlink
from net.lo to net.eth0 in openrc. If you read the service file
you'll see that all it does is takes whatever is to the right of the
@, tacks on a .conf, and uses that as the openvpn config file.
Another example is getty@ - you want to run 6 gettys and they all
start/stop independently, so instead of copying the same file 6 times
you just parameterize it.
--
Rich
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: systemd not starting wpa_supplicant after last update
2015-02-12 0:30 ` Rich Freeman
@ 2015-02-12 1:23 ` walt
0 siblings, 0 replies; 9+ messages in thread
From: walt @ 2015-02-12 1:23 UTC (permalink / raw
To: gentoo-user
On 02/11/2015 04:30 PM, Rich Freeman wrote:
> On Wed, Feb 11, 2015 at 6:37 PM, walt <w41ter@gmail.com> wrote:
>> On 02/11/2015 03:20 PM, Rich Freeman wrote:
>>> On Wed, Feb 11, 2015 at 5:37 PM, walt <w41ter@gmail.com> wrote:
>>>>
>>>> Yes, thank you! Did you use systemctl to make all the symlinks? I just did it
>>>> all manually and it works, but I'm not sure how I would have done it using systemctl.
>>>>
>>>
>>> systemctl enable <service>
>>>
>>> That looks in the unit's install section to see what target it should
>>> be associated with. This is actually a nice feature - with openrc it
>>> wasn't always obvious when things should go in the boot vs default
>>> runlevel, etc. But, all that command does is create the symlinks in
>>> the target.wants directory, so you can just create those yourself if
>>> you want to. That actually works for anything - you can effectively
>>> add a dependency to a unit by creating a directory of the appropriate
>>> name and symlinking the dependency inside.
>>
>> The symlink that was puzzling me is this one:
>>
>> wpa_supplicant@wlan0.service -> /usr/lib64/systemd/system/wpa_supplicant@.service
>>
>> The name of the symlink is not the same as the .service file it points to.
>> Is there a systemctl command that would do that for me?
>
> systemctl enable wpa_supplicant@wlan0
>
> That is an instanced service. It is a bit like creating a symlink
> from net.lo to net.eth0 in openrc. If you read the service file
> you'll see that all it does is takes whatever is to the right of the
> @, tacks on a .conf, and uses that as the openvpn config file.
> Another example is getty@ - you want to run 6 gettys and they all
> start/stop independently, so instead of copying the same file 6 times
> you just parameterize it.
Many thanks, I'll try it tomorrow morning when I'm fresh enough to deal
with any disaster I may cause :)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: systemd not starting wpa_supplicant after last update
2015-02-11 22:37 ` [gentoo-user] " walt
2015-02-11 23:20 ` Rich Freeman
@ 2015-02-12 1:29 ` Neil Bothwick
1 sibling, 0 replies; 9+ messages in thread
From: Neil Bothwick @ 2015-02-12 1:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
On Wed, 11 Feb 2015 14:37:22 -0800, walt wrote:
> > % ls -l /etc/systemd/system/systemd-networkd.service.wants/
> > systemd-resolved.service
> > -> /usr/lib/systemd/system/systemd-resolved.service
> > wpa_supplicant@wlan0.service
> > -> /usr/lib64/systemd/system/wpa_supplicant@.service
>
> Yes, thank you! Did you use systemctl to make all the symlinks? I
> just did it all manually and it works, but I'm not sure how I would
> have done it using systemctl.
I see Rich has already answered this because, ironically, I was unable to
after a kernel update stopped my wireless from working :(
Sod's Law determined that the kernel that broke thing was the one that I
decided to try using dracut instead of my home-brewed initramfs, so I
started off blaming that for the failure.
--
Neil Bothwick
You are a completely unique individual, just like everybody else.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-02-12 1:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 17:14 [gentoo-user] systemd not starting wpa_supplicant after last update walt
2015-02-11 19:22 ` Canek Peláez Valdés
2015-02-11 21:05 ` Neil Bothwick
2015-02-11 22:37 ` [gentoo-user] " walt
2015-02-11 23:20 ` Rich Freeman
2015-02-11 23:37 ` walt
2015-02-12 0:30 ` Rich Freeman
2015-02-12 1:23 ` walt
2015-02-12 1:29 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox