Skip to content
Snippets Groups Projects
Commit 328639e4 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

guix system: Always add zero previous entries in grub.cfg for 'init'.

* guix/scripts/system.scm (grub.cfg): Remove.
  (perform-action): Call 'operating-system-grub.cfg' with the empty list as
  the 2nd argument when ACTION is 'init.
parent 4a1bf090
No related branches found
No related tags found
No related merge requests found
...@@ -284,10 +284,6 @@ (define* (system-derivation-for-action os action ...@@ -284,10 +284,6 @@ (define* (system-derivation-for-action os action
((disk-image) ((disk-image)
(system-disk-image os #:disk-image-size image-size)))) (system-disk-image os #:disk-image-size image-size))))
(define (grub.cfg os)
"Return the GRUB configuration file for OS."
(operating-system-grub.cfg os (previous-grub-entries)))
(define* (maybe-build drvs (define* (maybe-build drvs
#:key dry-run? use-substitutes?) #:key dry-run? use-substitutes?)
"Show what will/would be built, and actually build DRVS, unless DRY-RUN? is "Show what will/would be built, and actually build DRVS, unless DRY-RUN? is
...@@ -317,7 +313,10 @@ (define* (perform-action action os ...@@ -317,7 +313,10 @@ (define* (perform-action action os
#:full-boot? full-boot? #:full-boot? full-boot?
#:mappings mappings)) #:mappings mappings))
(grub (package->derivation grub)) (grub (package->derivation grub))
(grub.cfg (grub.cfg os)) (grub.cfg (operating-system-grub.cfg os
(if (eq? 'init action)
'()
(previous-grub-entries))))
(drvs -> (if (and grub? (memq action '(init reconfigure))) (drvs -> (if (and grub? (memq action '(init reconfigure)))
(list sys grub grub.cfg) (list sys grub grub.cfg)
(list sys))) (list sys)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment