Posted by: Raffaele Spinelli | November 2, 2017

Gentoo, systemd and wpa_supplicant

Recently I switched from openRC to systemd. It was a tough choice, but beside the many, many discussion that took place over the years, I decided to give it a try.

Problem

So, here we are trying to do the transition. I followed the detailed guide provided by Gentoo on how to install systemd. After I finally rebooted, everything was working as expected, beside one little, small, annoying thing: the boot was taking 90 seconds.

So I inspected the log and find out the following messages during the boot:

A start job is running for sys-subsystem-net-devices-multi-user.device

Investigation

Apparently the service wpa_supplicant@wlo1.service was not enough. Something was using a multi-user device.
With a little help from my friend grep I found out the culprit.

grep -RHn multi /etc/systemd/
> /etc/systemd/system/multi-user.target.wants/wpa_supplicant@.service:15:alias=multi-user.target.wants/wpa_supplicant@%i.service

While the aforementioned file was referring to the multi-user device, the file /etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlo1.service looked good.

Conclusion

I hardcoded the interface in the mentioned file, in vim you can simply do :%s/%i/wlo1/g and at the next reboot, the boot was quick as one would expect.
Probably making the wpa_supplicant@.service a symlink to wpa_supplicant@wlo1.service would have sufficed as well.

NOTE: I only had wpa_supplicant@wlo1.service enabled with systemctl enable wpa_supplicant@wlo1.service.

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: