]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
update-helper: add missing loop over user units
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 4 Nov 2021 08:49:18 +0000 (09:49 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 4 Nov 2021 10:39:04 +0000 (11:39 +0100)
Noticed by Luca.

shellcheck doens't catch this, and somehow it was missed in review
and testing ;(

src/rpm/systemd-update-helper.in

index fa35e7ba90361b08dc33de3e6df07fd1dab025c7..7e007d480650d9f6b53793b19aa6b9d40e041dd6 100755 (executable)
@@ -52,8 +52,10 @@ case "$command" in
 
         users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
         for user in $users; do
-            SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
-                    systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+            for unit in "$@"; do
+                SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+                        systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+            done
         done
         wait
         ;;