From 5829c811dd082ac046846bb932d9d14fbc777c17 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 17 Oct 2017 13:20:37 +0200 Subject: systemd/system: symlinks for fedora-* services removed The symlinks are no longer needed. Enablement of default services is now managed by 'fedora-release' package. --- initscripts.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'initscripts.spec') diff --git a/initscripts.spec b/initscripts.spec index 00584e18..7d637979 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -29,6 +29,7 @@ Conflicts: ppp < 2.4.6-4 Requires(pre): /usr/sbin/groupadd Requires(post): /sbin/chkconfig, coreutils Requires(preun): /sbin/chkconfig +%{?systemd_requires} BuildRequires: glib2-devel popt-devel gettext pkgconfig systemd Provides: /sbin/service @@ -57,21 +58,27 @@ touch %{buildroot}%{_sysconfdir}/rc.d/rc.local chmod 755 %{buildroot}%{_sysconfdir}/rc.d/rc.local %post +%systemd_post fedora-import-state.service fedora-loadmodules.service fedora-readonly.service + /usr/sbin/chkconfig --add network > /dev/null 2>&1 || : /usr/sbin/chkconfig --add netconsole > /dev/null 2>&1 || : -if [ $1 -eq 1 ]; then - /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : -fi %preun +%systemd_preun fedora-import-state.service fedora-loadmodules.service fedora-readonly.service + if [ $1 = 0 ]; then /usr/sbin/chkconfig --del network > /dev/null 2>&1 || : /usr/sbin/chkconfig --del netconsole > /dev/null 2>&1 || : fi %postun -if [ $1 -ge 1 ]; then - /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : +%systemd_postun fedora-import-state.service fedora-loadmodules.service fedora-readonly.service + +# This should be removed in Rawhide for Fedora 29: +%triggerun -- initscripts < 9.78 +if [ $1 -gt 1 ]; then + systemctl enable fedora-import-state.service fedora-readonly.service &> /dev/null || : + echo -e "\nUPGRADE: Automatically re-enabling default systemd units: fedora-import-state.service fedora-readonly.service\n" || : fi %files -f %{name}.lang -- cgit v1.2.1