diff options
author | Thomas Haller <thaller@redhat.com> | 2017-09-26 14:51:14 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-27 18:02:51 +0200 |
commit | 513d0c2286c8cfe3618cf767da1511bcb939640a (patch) | |
tree | 70a43ce25e244040421e2ce99ebf2e8119f54970 /contrib | |
parent | e25de114b2cf3192d17c9796082c6d1ebfb5ac33 (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
"network-online.target.wants") we no longer install NM-w-o.service
in "network-online.target.wants" 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1455704
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/fedora/rpm/NetworkManager.spec | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 61f2e0a549..8e49c742b1 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -490,6 +490,16 @@ make %{?_smp_mflags} check %endif +%pre +if [ -f "%{systemd_dir}/network-online.target.wants/NetworkManager-wait-online.service" ] ; 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 || : +fi + + %post /usr/bin/udevadm control --reload-rules || : /usr/bin/udevadm trigger --subsystem-match=net || : |