Re: [gentoo-user] Re: systemd not starting wpa_supplicant after last update

2015-02-11 Thread Rich Freeman
On Wed, Feb 11, 2015 at 5:37 PM, walt w41...@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



Re: [gentoo-user] Re: systemd not starting wpa_supplicant after last update

2015-02-11 Thread Rich Freeman
On Wed, Feb 11, 2015 at 6:37 PM, walt w41...@gmail.com wrote:
 On 02/11/2015 03:20 PM, Rich Freeman wrote:
 On Wed, Feb 11, 2015 at 5:37 PM, walt w41...@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



Re: [gentoo-user] Re: systemd not starting wpa_supplicant after last update

2015-02-11 Thread Neil Bothwick
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.


pgpn4olVW_JzQ.pgp
Description: OpenPGP digital signature