rpm: call +needs-restart in parallel

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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-07-24 11:46:26 +02:00
parent 6d825ab2d4
commit 3598aff4d9
+2 -1
View File
@@ -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)