You are not logged in.

#1 2015-09-19 13:57:50

jhall
Member
Registered: 2012-09-10
Posts: 5

Disable NetworkManager-wait-online.service

The networkmanager package installs /usr/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service, which causes systemd to attempt to start the NetworkManager-wait-online.service at boot, which fails because of missing requisites.

I don't use NetworkManager to manage my network configuration.  It's just installed as a dependency.

How can I prevent NetworkManager-wait-online.service from starting up?  If I just remove the file in network-online.target.wants, it gets reinstalled whenever the package is updated.

Offline

#2 2015-09-19 14:07:12

ronw
Member
Registered: 2013-07-02
Posts: 50

Re: Disable NetworkManager-wait-online.service

$ systemctl disable NetworkManager-wait-online.service

or this might have been one that required masking ('systemctl mask') instead of disabling.

systemctl has a nice man page. Worth reading.

Offline

#3 2015-09-19 14:26:47

jhall
Member
Registered: 2012-09-10
Posts: 5

Re: Disable NetworkManager-wait-online.service

Disable didn't do anything, but mask worked.  Thanks.

My understanding is that it would be better to include a WantedBy=network-online.target line in the [Install] section of NetworkManager-wait-online.service (or add it to the existing WantedBy line) instead of including the symlink in the package.  That way, disable would work.  Is that incorrect?

Offline

#4 2015-09-19 14:57:48

ronw
Member
Registered: 2013-07-02
Posts: 50

Re: Disable NetworkManager-wait-online.service

jhall wrote:

Is that incorrect?

No idea. I have only the most casual acquaintance with the guts of service files.

Offline

#5 2015-09-19 15:57:52

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Disable NetworkManager-wait-online.service

jhall wrote:

Disable didn't do anything, but mask worked.  Thanks.

My understanding is that it would be better to include a WantedBy=network-online.target line in the [Install] section of NetworkManager-wait-online.service (or add it to the existing WantedBy line) instead of including the symlink in the package.  That way, disable would work.  Is that incorrect?

That is not incorrect (and I would probably have done it like that; also more similar to systemd-networkd-wait-online), but the way it is now is also not incorrect. The service fails to start, but that is what you want. By masking it you only prevent the failure from showing up.

There's a related bug report upstream: https://bugzilla.gnome.org/show_bug.cgi?id=746039#c22

That link points to the most relevant comment explaining how both methods achieve similar results (and they're reluctant to change things) and some further discussion follows. If you want to see a change, you can join/reopen that discussion, but [rant-mode]it seems like another case of gnome developers thinking all users are idiots that have to be protected against themselves by removing options[/rant-mode] (I still use NM myself, though).

jhall wrote:

I don't use NetworkManager to manage my network configuration.  It's just installed as a dependency.

I'm curious: a dependency for which package?

Last edited by Raynman (2015-09-19 16:00:21)

Offline

#6 2015-09-19 16:12:49

jhall
Member
Registered: 2012-09-10
Posts: 5

Re: Disable NetworkManager-wait-online.service

Thanks very much.  I'll read through that bug and try to gain a better understanding.

Raynman wrote:

I'm curious: a dependency for which package?

For steam-native.

Offline

#7 2015-12-19 15:52:58

toketin
Member
From: Belluno (Italy)
Registered: 2007-04-17
Posts: 326

Re: Disable NetworkManager-wait-online.service

I switched to connman for the network handling and i confirm the NetworkManager-wait-online.service still tries to autostart itself, even if i've disable both it and the networkmanager services of course. To fix this issue the only solution available is to mask the service?
Thanks!

Offline

#8 2016-08-19 15:36:33

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: Disable NetworkManager-wait-online.service

I know this is an old thread but I have the same issue on my newly installed Arch Linux. Right after d-bus is activated during boot I get this dependency warning that Network Manager is not online. Is the solution still just mask the service?

Offline

#9 2016-08-19 16:25:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,796

Re: Disable NetworkManager-wait-online.service

I think that would be best.  What is installed that needs NetworkManager as a dependency?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2016-08-19 16:33:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Disable NetworkManager-wait-online.service

fettouhi wrote:

I get this dependency warning that Network Manager is not online. Is the solution still just mask the service?

If you are not using NetworkManager to connect then it would be better to simply `disable` the unit rather than `mask` it.

Last edited by Head_on_a_Stick (2016-08-19 16:33:51)

Offline

#11 2016-08-19 20:45:52

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: Disable NetworkManager-wait-online.service

Head_on_a_Stick wrote:
fettouhi wrote:

I get this dependency warning that Network Manager is not online. Is the solution still just mask the service?

If you are not using NetworkManager to connect then it would be better to simply `disable` the unit rather than `mask` it.

I figured it out. I am using network manager but I forgot to enable the NetworkManager.service when I installed my PC. Many thanks!

Offline

Board footer

Powered by FluxBB