X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmacros.systemd.in;h=bea6ef1da3cbdf93f351cfafced28a020e0c07c5;hb=652212b0c2b60b9ef9b2e24eae82401f880fa21a;hp=0d5f8949ab52f955adcc265d2d5a7714ce2899fb;hpb=b532bdeae9b13fe93a54850f5e7f99c753bda6fa;p=elogind.git diff --git a/src/core/macros.systemd.in b/src/core/macros.systemd.in index 0d5f8949a..bea6ef1da 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} @@ -83,6 +96,10 @@ systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \ systemd-sysusers %{?*} >/dev/null 2>&1 || : \ %{nil} +%sysusers_create_inline() \ +echo %{?*} | systemd-sysusers - >/dev/null 2>&1 || : \ +%{nil} + %sysctl_apply() \ @rootlibexecdir@/systemd-sysctl %{?*} >/dev/null 2>&1 || : \ %{nil}