services: unattended-upgrade: Exit with non-zero upon failure.

Until now, the service would always exit with 0, which makes failures
harder to distinguish in the output of ‘herd status’, for instance.

* gnu/services/admin.scm (unattended-upgrade-shepherd-services)[code]:
Call ‘exit’ after ‘report-invoke-error’.

Change-Id: Idfc74a48a6a798e813db96d5770a897595b27240
This commit is contained in:
Ludovic Courtès 2025-03-26 15:52:37 +01:00
parent 80651b8899
commit 92205bab4d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -644,7 +644,8 @@ which lets you search for packages that provide a given file.")
(format #t "starting upgrade...~%")
(guard (c ((invoke-error? c)
(report-invoke-error c)))
(report-invoke-error c)
(exit 1)))
(apply invoke #$(file-append guix "/bin/guix")
"time-machine" "-C" #$channels
"--" "system" "reconfigure" #$arguments)