diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-04-15 15:22:47 +0200 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2017-04-15 15:22:47 +0200 |
commit | e61519ab9c26b2309c84b65456c4ee5cd4d2c163 (patch) | |
tree | 190eb5ff5e6471c6efc4dd2182dcf918311502b7 | |
parent | 7085ca9690f6b3838ae3dc0f832c30e41681e835 (diff) | |
download | guix-e61519ab9c26b2309c84b65456c4ee5cd4d2c163.tar guix-e61519ab9c26b2309c84b65456c4ee5cd4d2c163.tar.gz |
scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?.
* guix/scripts/system.scm (perform-action): Rename grub? to bootloader,
(%options): rename install-grub? to install-bootloader?,
(%default-options): ditto,
(process-action): reindent and rename grub? to bootloader?.
-rw-r--r-- | guix/scripts/system.scm | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index a1c6d35909..b1a754f92d 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -591,7 +591,7 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (_ "Failing to do that may downgrade your system!~%")))) (define* (perform-action action os - #:key grub? dry-run? derivations-only? + #:key bootloader? dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) @@ -631,7 +631,7 @@ output when building a system derivation, such as a disk image." ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; root. See <http://bugs.gnu.org/21068>. (drvs -> (if (memq action '(init reconfigure)) - (if grub? + (if bootloader? (list sys grub.cfg grub) (list sys grub.cfg)) (list sys))) @@ -648,7 +648,7 @@ output when building a system derivation, such as a disk image." drvs) ;; Make sure GRUB is accessible. - (when grub? + (when bootloader? (let ((prefix (derivation->output-path grub))) (setenv "PATH" (string-append prefix "/bin:" prefix "/sbin:" @@ -658,7 +658,7 @@ output when building a system derivation, such as a disk image." ((reconfigure) (mbegin %store-monad (switch-to-system os) - (mwhen grub? + (mwhen bootloader? (install-grub* (derivation->output-path grub.cfg) device "/")))) ((init) @@ -666,7 +666,7 @@ output when building a system derivation, such as a disk image." (format #t (_ "initializing operating system under '~a'...~%") target) (install sys (canonicalize-path target) - #:grub? grub? + #:grub? bootloader? #:grub.cfg (derivation->output-path grub.cfg) #:device device)) (else @@ -788,7 +788,7 @@ Some ACTIONS support additional ARGS.\n")) result))) (option '("no-grub") #f #f (lambda (opt name arg result) - (alist-cons 'install-grub? #f result))) + (alist-cons 'install-bootloader? #f result))) (option '("full-boot") #f #f (lambda (opt name arg result) (alist-cons 'full-boot? #t result))) @@ -825,7 +825,7 @@ Some ACTIONS support additional ARGS.\n")) (max-silent-time . 3600) (verbosity . 0) (image-size . ,(* 900 (expt 2 20))) - (install-grub? . #t))) + (install-bootloader? . #t))) ;;; @@ -837,23 +837,23 @@ Some ACTIONS support additional ARGS.\n")) ACTION must be one of the sub-commands that takes an operating system declaration as an argument (a file name.) OPTS is the raw alist of options resulting from command-line parsing." - (let* ((file (match args - (() #f) - ((x . _) x))) - (system (assoc-ref opts 'system)) - (os (if file - (load* file %user-module - #:on-error (assoc-ref opts 'on-error)) - (leave (_ "no configuration file specified~%")))) - - (dry? (assoc-ref opts 'dry-run?)) - (grub? (assoc-ref opts 'install-grub?)) - (target (match args - ((first second) second) - (_ #f))) - (device (and grub? - (grub-configuration-device - (operating-system-bootloader os))))) + (let* ((file (match args + (() #f) + ((x . _) x))) + (system (assoc-ref opts 'system)) + (os (if file + (load* file %user-module + #:on-error (assoc-ref opts 'on-error)) + (leave (_ "no configuration file specified~%")))) + + (dry? (assoc-ref opts 'dry-run?)) + (bootloader? (assoc-ref opts 'install-bootloader?)) + (target (match args + ((first second) second) + (_ #f))) + (device (and bootloader? + (grub-configuration-device + (operating-system-bootloader os))))) (with-store store (set-build-options-from-command-line store opts) @@ -879,7 +879,7 @@ resulting from command-line parsing." m) (_ #f)) opts) - #:grub? grub? + #:bootloader? bootloader? #:target target #:device device #:gc-root (assoc-ref opts 'gc-root))))) #:system system)))) |