diff options
authorThomas Haller <>2017-09-26 14:51:14 +0200
committerThomas Haller <>2017-09-27 18:02:51 +0200
commit513d0c2286c8cfe3618cf767da1511bcb939640a (patch)
parente25de114b2cf3192d17c9796082c6d1ebfb5ac33 (diff)
contrib/rpm: enable "NetworkManager-wait-online.service" on package upgrade
Since commit d61eaf2545c819cab17c29c4c13a3a3bd94b38a6 ("service: don't install dependency for "NetworkManager-wait-online.service" to "") we no longer install NM-w-o.service in "" directory. Obviously, for previous RPM versions NM-w-o.service was always enabled. For current versions, it depends now on the preset. Most importantly, this allows the user to disable the service, without masking it. Previously NM-w-o.service was always implicitly enabled. But presets are not applied during package upgrade, so it means that after upgrade the service will be disabled. Hack around that via an RPM scriptlet.
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index 61f2e0a54..8e49c742b 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -490,6 +490,16 @@ make %{?_smp_mflags} check
+if [ -f "%{systemd_dir}/" ] ; then
+ # older versions used to install this file, effectively always enabling
+ # NetworkManager-wait-online.service. We no longer do that and rely on
+ # preset.
+ # But on package upgrade we must explicitly enable it (rh#1455704).
+ systemctl enable NetworkManager-wait-online.service || :
/usr/bin/udevadm control --reload-rules || :
/usr/bin/udevadm trigger --subsystem-match=net || :