mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 01:20:12 +01:00
contrib/rpm: enable "NetworkManager-wait-online.service" on package upgrade
Since commitd61eaf2545("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 (cherry picked from commit513d0c2286)
This commit is contained in:
parent
34035ceee8
commit
c6efa864eb
1 changed files with 10 additions and 0 deletions
|
|
@ -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 || :
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue