]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rpm: call +needs-restart in parallel
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 22 Jul 2021 09:28:36 +0000 (11:28 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 24 Jul 2021 09:46:26 +0000 (11:46 +0200)
Some rpms install a bunch of units… It seems nicer to invoke them all in
parallel. In particular, timeouts in systemctl also run in parallel, so if
there's some communication mishap, we will wait less.

src/rpm/systemd-update-helper.in

index 9fa49fa13194e393f6af50cd974eb70f13a995aa..f3c75b75fa7f9e7dfa82caea5f2bf687ad6feabe 100755 (executable)
@@ -32,8 +32,9 @@ case "$command" in
         [ -d /run/systemd/system ] || exit 0
 
         for unit in "$@"; do
-            systemctl set-property "$unit" Markers=+needs-restart || :
+            systemctl set-property "$unit" Markers=+needs-restart &
         done
+        wait
         ;;
 
     system-reload-restart|system-reload|system-restart)