Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 347517

Summary: net-misc/networkmanager-0.8.2 does not start on demand with systemd
Product: Gentoo Linux Reporter: Kyle Milz <kmilz>
Component: Current packagesAssignee: Robert Piasek (RETIRED) <dagger>
Status: RESOLVED INVALID    
Severity: normal CC: hsggebhardt, maggu2810, nirbheek, steev
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to fix.

Description Kyle Milz 2010-12-02 07:30:12 UTC
NetworkManager is supposed to load on demand when used with systemd. For example, when knetworkmanager is started it queries dbus for NetworkManager and systemd is supposed to control the starting of the NetworkManager daemon. 

I had this working and then it broke randomly and so I tracked down the problem. 
This should maybe go upstream? 

Reproducible: Always

Steps to Reproduce:
1. Start NetworkManager client, eg. knetworkmanager
2. Watch NetworkManager daemon not automatically start
3.



Expected Results:  
Load on demand behaviour from NetworkManager daemon. 

Attaching patch to fix (at least for me -- not sure if I am doing this right )
Comment 1 Kyle Milz 2010-12-02 07:31:29 UTC
Created attachment 256111 [details, diff]
Patch to fix.
Comment 2 Henry Gebhardt 2010-12-03 23:36:09 UTC
Networkmanager now comes with an upstream provided unit file that sets the alias, so that the dbus from upstream is actually correct.

So, this patch should not be needed anymore.

Thanks,
Henry
Comment 3 Henry Gebhardt 2010-12-04 13:03:18 UTC
I actually was a bit too fast.  You need to enable NetworkManager.  If you run "systemctl enable NetworkManager.service", then it will create three symlinks under /etc/systemd/system.  If you only want start-on-demand, then you only need

   /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service -> /lib64/systemd/system/NetworkManager.service

I think this makes sense for Gentoo, as follows:  With the symlinks you can choose if you want on-demand enabled, if it should be part of the multi-user.target, or the network.target, or any combination thereof.

Does that work for you?
Comment 4 Kyle Milz 2010-12-09 04:34:01 UTC
Yeah adding the symlink in /etc/systemd/system works perfect.

Thanks for your time. 
Comment 5 Robert Piasek (RETIRED) gentoo-dev 2010-12-14 09:42:24 UTC
Hi,

I'm closing this bug. Systemd is not in the official tree yet, and working version of systemd and some services - including networkmanager - can be found in systemd overlay.

For more information about systemd, I suggest few articles written by systemd author:
http://0pointer.de/blog/projects/systemd-for-admins-1.html
http://0pointer.de/blog/projects/systemd-for-admins-2.html
http://0pointer.de/blog/projects/systemd-for-admins-3.html
http://0pointer.de/blog/projects/systemd-for-admins-4.html