Skip to content

Commit

Permalink
simplify the code as suggested #1996
Browse files Browse the repository at this point in the history
Signed-off-by: Gratien D'haese <gratien.dhaese@gmail.com>
  • Loading branch information
gdha committed Dec 17, 2018
1 parent 16eec1d commit f9e53a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions usr/share/rear/lib/uefi-functions.sh
Expand Up @@ -46,11 +46,11 @@ function build_bootx86_efi {
Log "Did not find grub-mkimage (cannot build bootx86.efi)"
return
fi
if [[ -f /etc/slackware-version ]] || [[ -f /etc/fedora-release ]] ; then
# slackware grub doesn't have linuxefi module
$gmkimage $v -O x86_64-efi -c $TMP_DIR/mnt/EFI/BOOT/embedded_grub.cfg -o $TMP_DIR/mnt/EFI/BOOT/BOOTX64.efi -p "/EFI/BOOT" part_gpt part_msdos fat ext2 normal chain boot configfile linux multiboot jfs iso9660 usb usbms usb_keyboard video udf ntfs all_video gzio efi_gop reboot search test echo btrfs
else
$gmkimage $v -O x86_64-efi -c $TMP_DIR/mnt/EFI/BOOT/embedded_grub.cfg -o $TMP_DIR/mnt/EFI/BOOT/BOOTX64.efi -p "/EFI/BOOT" part_gpt part_msdos fat ext2 normal chain boot configfile linux linuxefi multiboot jfs iso9660 usb usbms usb_keyboard video udf ntfs all_video gzio efi_gop reboot search test echo btrfs
fi
# as not all Linux distro's have the same kernel modules present we verify what we have (see also https://github.com/rear/rear/pull/2001)
grub_modules=""
for grub_module in part_gpt part_msdos fat ext2 normal chain boot configfile linux linuxefi multiboot jfs iso9660 usb usbms usb_keyboard video udf ntfs all_video gzio efi_gop reboot search test echo btrfs ; do
test "$( find /boot -type f -name "$grub_module.mod" 2>/dev/null )" && grub_modules="$grub_modules $grub_module"
done
$gmkimage $v -O x86_64-efi -c $TMP_DIR/mnt/EFI/BOOT/embedded_grub.cfg -o $TMP_DIR/mnt/EFI/BOOT/BOOTX64.efi -p "/EFI/BOOT" $grub_modules
StopIfError "Error occurred during $gmkimage of BOOTX64.efi"
}

0 comments on commit f9e53a3

Please sign in to comment.