forked from pool/systemd-rpm-macros
Accepting request 876963 from home:alarrosa:branches:Base:System
- Fix %systemd_user_post. The --global parameter was handled as if it was another service name so %systemd_user_post wasn't working properly. Replace %systemd_user_post with the code from %service_add_post it was being expanded to but correctly passing --global to systemctl (boo#1183051, boo#1182661). OBS-URL: https://build.opensuse.org/request/show/876963 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=62
This commit is contained in:
@@ -172,7 +172,13 @@ fi \
|
||||
%systemd_postun() %{expand::%%service_del_postun_without_restart %{?**}}
|
||||
%systemd_postun_with_restart() %{expand::%%service_del_postun %{?**}}
|
||||
|
||||
%systemd_user_post() %{expand:%systemd_post \\--global %%{?*}}
|
||||
%systemd_user_post() \
|
||||
if [ -x /usr/bin/systemctl ] && [ $1 -eq 1 ]; then \
|
||||
for service in %{?*} ; do \
|
||||
/usr/bin/systemctl --global preset "$service" || : \
|
||||
done \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
%systemd_user_preun() \
|
||||
if [ $1 -eq 0 -a -x /usr/bin/systemctl ]; then \
|
||||
|
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 4 13:11:15 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Fix %systemd_user_post. The --global parameter was handled as if
|
||||
it was another service name so %systemd_user_post wasn't working
|
||||
properly. Replace %systemd_user_post with the code from
|
||||
%service_add_post it was being expanded to but correctly passing
|
||||
--global to systemctl (boo#1183051, boo#1182661).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 12 11:46:17 UTC 2021 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
Reference in New Issue
Block a user