scripts: Make boot-parameters label include generation number and time.

* guix/scripts/system.scm (system->boot-parameters): Make label include
generation number and time.
This commit is contained in:
Danny Milosavljevic 2017-04-21 14:37:10 +02:00
parent 9530e73b49
commit 0315abe608
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -369,8 +369,13 @@ (define* (profile-boot-parameters #:optional (profile %system-profile)
NUMBERS, which is a list of generation numbers."
(define (system->boot-parameters system number time)
(unless-file-not-found
(let* ((params (read-boot-parameters-file system)))
params)))
(let* ((params (read-boot-parameters-file system))
(label (boot-parameters-label params)))
(boot-parameters
(inherit params)
(label (string-append label " (#"
(number->string number) ", "
(seconds->string time) ")"))))))
(let* ((systems (map (cut generation-file-name profile <>)
numbers))
(times (map (lambda (system)