aboutsummaryrefslogtreecommitdiffstats
path: root/rpm-helper.macros.in
diff options
context:
space:
mode:
authorAndrey Borzenkov <arvidjaar@mandriva.org>2011-03-08 15:58:51 +0000
committerAndrey Borzenkov <arvidjaar@mandriva.org>2011-03-08 15:58:51 +0000
commit66751df274c0abce216e1bd4cf147dec67da8632 (patch)
tree630b2ccf78d0850dab72dcb7d9257905482f08a2 /rpm-helper.macros.in
parent74eee552b4d032320f824289650b93cd3157d5ec (diff)
downloadrpm-helper-66751df274c0abce216e1bd4cf147dec67da8632.tar
rpm-helper-66751df274c0abce216e1bd4cf147dec67da8632.tar.gz
rpm-helper-66751df274c0abce216e1bd4cf147dec67da8632.tar.bz2
rpm-helper-66751df274c0abce216e1bd4cf147dec67da8632.tar.xz
rpm-helper-66751df274c0abce216e1bd4cf147dec67da8632.zip
add _systemd_migrate_service macro for sysv -> systemd switch
Diffstat (limited to 'rpm-helper.macros.in')
-rw-r--r--rpm-helper.macros.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/rpm-helper.macros.in b/rpm-helper.macros.in
index d567f10..8d0859a 100644
--- a/rpm-helper.macros.in
+++ b/rpm-helper.macros.in
@@ -65,3 +65,9 @@
%_postun_webapp() %_del_webapp_helper %{name} $1 \
%{nil}
+# systemd support
+%_systemd_migrate_service() \
+if [ -x /bin/systemctl ] && /sbin/chkconfig --no-redirect --level=3 %{1}; then \
+ /bin/systemctl --quiet enable %{1}.service \
+fi \
+%{nil}