From 21fcfe1ee969cc477dc41486ae4074e655d44274 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 16 Mar 2019 17:09:19 +0100 Subject: bootloader: Use 'invoke/quiet' when running 'grub-install' and co. This hides potentially confusing GRUB messages from the user, such as "Installing for i386-pc platform." * gnu/bootloader/extlinux.scm (install-extlinux): Use 'invoke/quiet' instead of 'system*' and 'error'. * gnu/bootloader/grub.scm (install-grub, install-grub-efi): Likewise. * guix/scripts/system.scm (bootloader-installer-script): Guard against 'message-condition?' and handle them properly. --- gnu/bootloader/grub.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/bootloader/grub.scm') diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 51d5787364..14aede72c5 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -369,10 +369,11 @@ (define install-grub ;; root partition. (setenv "GRUB_ENABLE_CRYPTODISK" "y") - (unless (zero? (system* grub "--no-floppy" "--target=i386-pc" - "--boot-directory" install-dir - device)) - (error "failed to install GRUB (BIOS)"))))) + ;; Hide potentially confusing messages from the user, such as + ;; "Installing for i386-pc platform." + (invoke/quiet grub "--no-floppy" "--target=i386-pc" + "--boot-directory" install-dir + device)))) (define install-grub-efi #~(lambda (bootloader efi-dir mount-point) @@ -388,10 +389,9 @@ (define install-grub-efi ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or ;; root partition. (setenv "GRUB_ENABLE_CRYPTODISK" "y") - (unless (zero? (system* grub-install "--boot-directory" install-dir - "--bootloader-id=Guix" - "--efi-directory" target-esp)) - (error "failed to install GRUB (EFI)"))))) + (invoke/quiet grub-install "--boot-directory" install-dir + "--bootloader-id=Guix" + "--efi-directory" target-esp)))) -- cgit v1.2.3