-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simpler code in 310_include_uefi_tools.sh to fix jsmeix@9bb0735#commitcomment-24177948 and some general cleanup.
- Loading branch information
Showing
1 changed file
with
23 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
# If noefi is set, we can ignore UEFI altogether | ||
if grep -qw 'noefi' /proc/cmdline; then | ||
return | ||
fi | ||
# | ||
# 310_include_uefi_tools.sh | ||
# Copy UEFI binaries we might need into the ReaR recovery system. | ||
# | ||
|
||
# If no /boot/[eE][fF][iI] directory can be found we might not be able to copy the UEFI binaries. | ||
if [[ ! -d /boot/[eE][fF][iI] ]]; then | ||
# If 'noefi' is set on the kernel commandline, ignore UEFI altogether: | ||
grep -qw 'noefi' /proc/cmdline && return | ||
|
||
# If no /boot/[eE][fF][iI] directory can be found | ||
# we might not be able to copy the UEFI binaries: | ||
if ! test -d /boot/[eE][fF][iI] ; then | ||
if is_true $USING_UEFI_BOOTLOADER; then | ||
Error "USING_UEFI_BOOTLOADER = 1 but there is no directory at /boot/efi or /boot/EFI" # abort | ||
Error "USING_UEFI_BOOTLOADER is set but there is no directory /boot/efi or /boot/EFI" | ||
fi | ||
return # skip | ||
fi | ||
|
||
# We copy the UEFI binaries we might need | ||
REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" | ||
dosfsck | ||
efibootmgr | ||
) | ||
|
||
PROGS=( "${PROGS[@]}" | ||
gdisk | ||
parted | ||
uefivars | ||
) | ||
return | ||
fi | ||
|
||
# Copy UEFI binaries we might need: | ||
REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" dosfsck efibootmgr ) | ||
PROGS=( "${PROGS[@]}" gdisk parted uefivars ) | ||
MODULES=( "${MODULES[@]}" efivars ) | ||
|
||
if [[ -f /sbin/elilo ]]; then | ||
if test -f /sbin/elilo ; then | ||
# this is probably SLES | ||
PROGS=( "${PROGS[@]}" elilo perl ) | ||
COPY_AS_IS=( "${COPY_AS_IS[@]}" /etc/elilo.conf /usr/lib64/crt0-efi-x86_64.o /usr/lib64/elf_x86_64_efi.lds \ | ||
/usr/lib64/libefi.a /usr/lib64/libgnuefi.a ) | ||
COPY_AS_IS=( "${COPY_AS_IS[@]}" | ||
/etc/elilo.conf | ||
/usr/lib64/crt0-efi-x86_64.o | ||
/usr/lib64/elf_x86_64_efi.lds | ||
/usr/lib64/libefi.a | ||
/usr/lib64/libgnuefi.a ) | ||
fi |