mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
Move detect_firmware_type to the prepare module.
This avoids the duplication between the bootloader and grub modules.
This commit is contained in:
parent
930a49677a
commit
4df754ef29
4 changed files with 12 additions and 24 deletions
|
@ -23,17 +23,6 @@ import libcalamares
|
|||
from libcalamares.utils import check_chroot_call
|
||||
|
||||
|
||||
def detect_firmware_type():
|
||||
# Check for EFI variables support
|
||||
if(os.path.exists("/sys/firmware/efi/efivars")):
|
||||
fw_type = 'efi'
|
||||
else:
|
||||
fw_type = 'bios'
|
||||
|
||||
libcalamares.globalstorage.insert("firmwareType", fw_type)
|
||||
libcalamares.utils.debug("Firmware type: {!s}".format(fw_type))
|
||||
|
||||
|
||||
def install_grub(boot_loader, fw_type):
|
||||
if fw_type == 'efi':
|
||||
efi_directory = "/boot/efi"
|
||||
|
@ -49,7 +38,6 @@ def install_grub(boot_loader, fw_type):
|
|||
|
||||
|
||||
def run():
|
||||
detect_firmware_type()
|
||||
boot_loader = libcalamares.globalstorage.value("bootLoader")
|
||||
fw_type = libcalamares.globalstorage.value("firmwareType")
|
||||
install_grub(boot_loader, fw_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue