Red Hat Bugzilla – Bug 978026
NetworkManager dispatcher unit file preset has wrong unit file name
Last modified: 2013-06-26 04:05:01 EDT
+++ This bug was initially created as a clone of Bug #948433 +++
Currently nm_dispatcher is being forked off dbus-daemon by dbus's own activation logic. It would be a good thing if nm_dispatcher would be turned into its own systemd service instead, so that it can be introspected and controlled like any other system service, gets its own set of indexed logs, and so on. nm_dispatcher is currently one of the very few services we install by default that isn't a systemd service of its own.
Please make the following changes:
Add the following line to /usr/share/dbus-1/system-services/org.freedesktop.nm_dispatcher.service:
Then, introduce /usr/lib/systemd/system/nm_dispatcher.service in your RPM:
Description=Network Managing Dispatcher Service
Finally, add the snippets listed in https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd to you spec file:
I will add nm_dispatcher.service to the preset file we ship, to ensure it is enabled by default.
Of course, please consider doing this changes together with those suggested in https://bugzilla.redhat.com/show_bug.cgi?id=787314#c37 -- in that case you can (and should) merge the macro lines above, to include the three unit names in the same line:
%systemd_post NetworkManager.service NetworkManager-wait-online.service nm_dispatcher.service
%systemd_preun NetworkManager.service NetworkManager-wait-online.service nm_dispatcher.service
--- Additional comment from Dan Williams on 2013-05-15 07:27:42 CDT ---
I've actually got plans to just merge the dispatcher back into NM for a variety of reasons, so I'm not sure we should bother to systemd-ize it at this point? I'm not 100% sure when those changes would land though, possibly not by F19, so perhaps we do just systemd-ize it and then remove it again for F20?
--- Additional comment from Dan Williams on 2013-05-15 10:32:49 CDT ---
Built for F20; F19 will follow soon. NetworkManager-0.9.9.0-2.git20130515.fc20
--- Additional comment from Fedora Update System on 2013-06-07 17:28:38 CDT ---
NetworkManager-0.9.8.2-1.fc19,network-manager-applet-0.9.8.2-1.fc19 has been submitted as an update for Fedora 19.
--- Additional comment from Fedora Update System on 2013-06-08 22:28:18 CDT ---
NetworkManager-0.9.8.2-1.fc19, network-manager-applet-0.9.8.2-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
--- Additional comment from Berend De Schouwer on 2013-06-11 02:43:02 CDT ---
Scripts in /etc/NetworkManager/dispatcher.d/ no longer run. I assume it's related to this (it appears related to NetworkManager-0.9.8.2-1.fc19)
I need a custom one for the corporate network when the laptop connects.
$ systemctl status dbus-org.freedesktop.nm-dispatcher.service
Loaded: error (Reason: No such file or directory)
Active: inactive (dead)
%systemd_post seems to only run on install, not on upgrade of NetworkManager.
/usr/lib/systemd/system/nm_dispatcher.service doesn't exist, but
/usr/share/dbus-1/system-services/org.freedesktop.nm_dispatcher.service references it. /usr/lib/systemd/system/NetworkManager-dispatcher.service exists instead.
/usr/libexec/nm-dispatcher.action exists and references /etc/NetworkManager/dispatcher.d
/usr/bin/systemctl preset NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service doesn't seem to work. It's still dbus-org.freedesktop.nm-dispatcher.service no such file or directory.
--- Additional comment from Berend De Schouwer on 2013-06-24 08:08:40 CDT ---
I think I fixed the dispatcher with:
sudo systemctl enable NetworkManager-dispatcher.service
ln -s '/usr/lib/systemd/system/NetworkManager-dispatcher.service' '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service'
ln -s '/usr/lib/systemd/system/NetworkManager-dispatcher.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager-dispatcher.service'
--- Additional comment from Berend De Schouwer on 2013-06-24 08:14:07 CDT ---
Probable root cause: /usr/lib/systemd/system-preset/90-default.preset contains
'enable nm_dispatcher.service' but not 'enable NetworkManager-dispatcher.service'
TLDR: it's NetworkManager-dispatcher.service, not nm_dispatcher.service. I suppose it could use a round of cleanups to harmonize the names and the dbus service and everything else but it's likely to change in the future anyway.
This is bug 977433, isn't it?
*** This bug has been marked as a duplicate of bug 977433 ***