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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user