From e61519ab9c26b2309c84b65456c4ee5cd4d2c163 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 15 Apr 2017 15:22:47 +0200 Subject: 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?. --- guix/scripts/system.scm | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'guix/scripts') 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 @@ (define latest (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 @@ (define println ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; root. See . (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 @@ (define println 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 @@ (define println ((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 @@ (define println (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 @@ (define %options 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 @@ (define %default-options (max-silent-time . 3600) (verbosity . 0) (image-size . ,(* 900 (expt 2 20))) - (install-grub? . #t))) + (install-bootloader? . #t))) ;;; @@ -837,23 +837,23 @@ (define (process-action action args opts) 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 @@ (define (process-action action args opts) m) (_ #f)) opts) - #:grub? grub? + #:bootloader? bootloader? #:target target #:device device #:gc-root (assoc-ref opts 'gc-root))))) #:system system)))) -- cgit v1.2.3