Move detect_firmware_type to the prepare module.

This avoids the duplication between the bootloader and grub modules.
This commit is contained in:
Kevin Kofler 2014-11-19 13:58:18 +01:00
parent 930a49677a
commit 4df754ef29
4 changed files with 12 additions and 24 deletions

View file

@ -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)