Skip to content

Commit

Permalink
pdist-bootcheck: Run async update as transient service
Browse files Browse the repository at this point in the history
Run the update as a separate service instead of as a forked
process to avoid the error message

    pdist-bootcheck.service: Failed to destroy cgroup /system.slice/pdist-bootcheck.service, ignoring: Device or resource busy

and to capture the exist status in systemd and the output in the
journal.
  • Loading branch information
donald committed Jul 5, 2023
1 parent 9a375fd commit 47f983a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdist/pdist-bootcheck
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ else
fi

if [ "$need_async_pdist" ]; then
netcat $(distmaster) 237 >/dev/null 2>&1 </dev/null &
systemd-run --unit pdist-async-update --service-type=simple --remain-after-exit \
netcat $(distmaster) 237
echo triggered background update
elif [ "$need_pdist_and_reboot" ]; then
if [[ -e /var/run/updatecheck.reboot-triggered ]]; then
Expand Down

0 comments on commit 47f983a

Please sign in to comment.