summaryrefslogtreecommitdiff
path: root/src/rpm
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-23 15:35:23 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-24 13:11:13 +0200
commit1262e824a4d638e347ae0d39c973f1f750962533 (patch)
tree948b5cdf260871e0839b67dc5b7a7b9367737329 /src/rpm
parent36d55958ccc75fa3c91bdd7354d74c910f2f6cc7 (diff)
downloadsystemd-1262e824a4d638e347ae0d39c973f1f750962533.tar.gz
update-helper: also add "user-reexec" verb
This is not called from the systemd.triggers or systemd.macros files. Instead, it would be called from the scriptlets in systemd rpm package itself, at the place where we call systemctl daemon-reexec. See https://github.com/systemd/systemd/pull/20289#issuecomment-885622200 .
Diffstat (limited to 'src/rpm')
-rwxr-xr-xsrc/rpm/systemd-update-helper.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index f3466ab3c0..0c6675a9db 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -74,7 +74,7 @@ case "$command" in
fi
;;
- user-reload-restart|user-reload|user-restart)
+ user-reload-restart|user-reload|user-restart|user-reexec)
if [ -n "$*" ]; then
echo "Unexpected arguments for '$command': $*"
exit 2
@@ -84,6 +84,14 @@ case "$command" in
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
+ if [[ "$command" =~ reexec ]]; then
+ for user in $users; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" daemon-reexec &
+ done
+ wait
+ fi
+
if [[ "$command" =~ reload ]]; then
for user in $users; do
SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \