aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-06-20 12:33:57 +0100
committerChristopher Baines <mail@cbaines.net>2022-06-21 12:17:34 +0100
commite60b41de1effc93918d02c6049d9503d8814eb48 (patch)
tree643b818765f9605ef36a0cbbc237d613675378ff
parent6f75565b4ec3b8a7247699c327a3b3196c787f76 (diff)
downloadguix-inline-menu-entries-in-bootcfg.tar
guix-inline-menu-entries-in-bootcfg.tar.gz
guix system: Inline menu-entries in to bootcfg in perform-action.inline-menu-entries-in-bootcfg
This avoids an exception when generating images, where the reading of boot parameters fails. * guix/scripts/system.scm (perform-action): Inline menu-entries in to bootcfg.
-rw-r--r--guix/scripts/system.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 63e3b9b934..b9084a401c 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -800,11 +800,6 @@ static checks."
(define println
(cut format #t "~a~%" <>))
- (define menu-entries
- (if (eq? 'init action)
- '()
- (map boot-parameters->menu-entry (profile-boot-parameters))))
-
(define os
(image-operating-system image))
@@ -813,7 +808,11 @@ static checks."
(define bootcfg
(and (memq action '(init reconfigure))
- (operating-system-bootcfg os menu-entries)))
+ (operating-system-bootcfg
+ os
+ (if (eq? action 'init)
+ '()
+ (map boot-parameters->menu-entry (profile-boot-parameters))))))
(when (eq? action 'reconfigure)
(maybe-suggest-running-guix-pull)