From 18bd455ae1c07b0355cde105d58841b6c52f67c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= Date: Sun, 17 Jun 2018 07:47:58 +0200 Subject: [PATCH] [bootloader] make paths for executable optional and adjustable --- src/modules/bootloader/bootloader.conf | 6 ++++-- src/modules/bootloader/main.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/bootloader/bootloader.conf b/src/modules/bootloader/bootloader.conf index def686262..ee8680f72 100644 --- a/src/modules/bootloader/bootloader.conf +++ b/src/modules/bootloader/bootloader.conf @@ -21,12 +21,14 @@ timeout: "10" # GRUB 2 binary names and boot directory # Some distributions (e.g. Fedora) use grub2-* (resp. /boot/grub2/) names. # These names are also used when using sb-shim, since that needs some -# GRUB functionality (notably grub-probe) to work. +# GRUB functionality (notably grub-probe) to work. As needed, you may use +# complete paths like `/usr/bin/efibootmgr` for the executables. # grubInstall: "grub-install" grubMkconfig: "grub-mkconfig" grubCfg: "/boot/grub/grub.cfg" -grubProbe: "/usr/sbin/grub2-probe" +grubProbe: "grub-probe" +efiBootMgr: "efibootmgr" # Optionally set the bootloader ID to use for EFI. This is passed to # grub-install --bootloader-id. diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 1abee68f7..dec0bda4b 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -8,7 +8,7 @@ # Copyright 2014, Daniel Hillenbrand # Copyright 2014, Benjamin Vaudour # Copyright 2014, Kevin Kofler -# Copyright 2015-2017, Philip Mueller +# Copyright 2015-2018, Philip Mueller # Copyright 2016-2017, Teo Mrnjavac # Copyright 2017, Alf Gaida # Copyright 2017-2018, Adriaan de Groot @@ -351,7 +351,7 @@ def install_secureboot(efi_directory): raise ValueError("No partition number found for %s" % install_efi_directory) subprocess.call([ - "/usr/sbin/efibootmgr", + libcalamares.job.configuration["efiBootMgr"], "-c", "-w", "-L", efi_bootloader_id,