summaryrefslogtreecommitdiff
path: root/src/core/macros.systemd.in
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-27 21:34:09 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-27 22:34:09 -0400
commit7c67f0f71a2a4e64264e925977645e306816a3ab (patch)
tree70c5ac4171ead76723d4e27af5fea95d806fa6ee /src/core/macros.systemd.in
parente46b13c8c7f48f81d4e09912f2265daaa7f6d27e (diff)
rpm: add user macros
Diffstat (limited to 'src/core/macros.systemd.in')
-rw-r--r--src/core/macros.systemd.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/macros.systemd.in b/src/core/macros.systemd.in
index 333f222de0..bea6ef1da3 100644
--- a/src/core/macros.systemd.in
+++ b/src/core/macros.systemd.in
@@ -43,6 +43,8 @@ if [ $1 -eq 1 ] ; then \
fi \
%{nil}
+%systemd_user_post() %systemd_post --user --global %{?*}
+
%systemd_preun() \
if [ $1 -eq 0 ] ; then \
# Package removal, not upgrade \
@@ -51,10 +53,19 @@ if [ $1 -eq 0 ] ; then \
fi \
%{nil}
+%systemd_user_preun() \
+if [ $1 -eq 0 ] ; then \
+ # Package removal, not upgrade \
+ systemctl --no-reload --user --global disable %{?*} > /dev/null 2>&1 || : \
+fi \
+%{nil}
+
%systemd_postun() \
systemctl daemon-reload >/dev/null 2>&1 || : \
%{nil}
+%systemd_user_postun() %{nil}
+
%systemd_postun_with_restart() \
systemctl daemon-reload >/dev/null 2>&1 || : \
if [ $1 -ge 1 ] ; then \
@@ -63,6 +74,8 @@ if [ $1 -ge 1 ] ; then \
fi \
%{nil}
+%systemd_user_postun_with_restart() %{nil}
+
%udev_hwdb_update() \
udevadm hwdb --update >/dev/null 2>&1 || : \
%{nil}