aboutsummaryrefslogtreecommitdiffstats
path: root/initscripts.spec
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2017-10-17 13:20:37 +0200
committerDee'Kej <deekej@linuxmail.org>2017-10-19 11:22:19 +0200
commit5829c811dd082ac046846bb932d9d14fbc777c17 (patch)
treed6856ba11b5995ca15d5a0c2e21407701dc7d706 /initscripts.spec
parentc9c00e84a9a8bfb47271c1295d34c812676a0912 (diff)
downloadinitscripts-5829c811dd082ac046846bb932d9d14fbc777c17.tar
initscripts-5829c811dd082ac046846bb932d9d14fbc777c17.tar.gz
initscripts-5829c811dd082ac046846bb932d9d14fbc777c17.tar.bz2
initscripts-5829c811dd082ac046846bb932d9d14fbc777c17.tar.xz
initscripts-5829c811dd082ac046846bb932d9d14fbc777c17.zip
systemd/system: symlinks for fedora-* services removed
The symlinks are no longer needed. Enablement of default services is now managed by 'fedora-release' package.
Diffstat (limited to 'initscripts.spec')
-rw-r--r--initscripts.spec17
1 files changed, 12 insertions, 5 deletions
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