summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi4
-rw-r--r--gnu/services/admin.scm10
2 files changed, 10 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 43aa1ad71a9..a2915de9546 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -23337,6 +23337,10 @@ system to use for the upgrade. If no value is provided the
This field specifies whether the system should reboot after completing
an unattended upgrade.
+When @code{reboot?} is @code{#t}, services are not restarted before
+rebooting. This means that the value for @code{services-to-restart} is
+ignored. The updated services will be started after the system reboots.
+
@item @code{services-to-restart} (default: @code{'(mcron)})
This field specifies the Shepherd services to restart when the upgrade
completes.
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 4882883878a..24ff659a01b 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -512,11 +512,13 @@ which lets you search for packages that provide a given file.")
#$(string-append (number->string expiration)
"s")))
- (format #t "~a restarting services...~%" (timestamp))
- (for-each restart-service '#$services)
+ (unless #$reboot?
+ ;; Rebooting effectively restarts services anyway and execution
+ ;; would be halted here if mcron is restarted.
+ (format #t "~a restarting services...~%" (timestamp))
+ (for-each restart-service '#$services))
- ;; XXX: If 'mcron' has been restarted, perhaps this isn't
- ;; reached.
+ ;; XXX: If 'mcron' has been restarted, this is not reached.
(format #t "~a upgrade complete~%" (timestamp))
;; Stopping the root shepherd service triggers a reboot.