Update kernel-install Plugin
- Update memtest86+.kernel-install-plugin to fallback to 20-grub.install behaviour (RHBZ#2137395)
This commit is contained in:
parent
79ce2a2a19
commit
b65d1cd8a1
@ -1,4 +1,8 @@
|
||||
#!/usr/bin/bash
|
||||
#
|
||||
# Manage memtest86+ install location and bootloader config.
|
||||
# Currently only manages GRUB with BLS support enabled.
|
||||
#
|
||||
|
||||
# Sanity Checks
|
||||
if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
|
||||
@ -17,10 +21,16 @@ MEMTEST_VERSION="$2"
|
||||
BOOT_DIR_ABS="$3"
|
||||
MEMTEST_IMAGE="$4"
|
||||
|
||||
IMAGE_DIR="${MEMTEST_IMAGE%/*}"
|
||||
MEMTEST_DIR="${MEMTEST_IMAGE%/*}"
|
||||
BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT}"
|
||||
MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID}"
|
||||
BLS_DIR="${BOOT_ROOT}/loader/entries"
|
||||
# Fail back to /boot default if BLS_DIR
|
||||
# doesn't exist already, matching 20-grub.install
|
||||
if [[ ! -d "${BLS_DIR}" ]]; then
|
||||
BOOT_ROOT="/boot"
|
||||
BLS_DIR="/boot/loader/entries"
|
||||
fi
|
||||
BLS_ENTRY="${BLS_DIR}/${MACHINE_ID}-0-memtest86+.conf"
|
||||
|
||||
# Setup functions
|
||||
@ -38,7 +48,7 @@ grub_class ${ID}
|
||||
EOF
|
||||
}
|
||||
|
||||
# If ${BOOT_DIR_ABS} exists, some other boot loader is active.
|
||||
# If ${BOOT_DIR_ABS} exists, non-grub boot loader is active.
|
||||
[[ -d "${BOOT_DIR_ABS}" ]] && exit 0
|
||||
|
||||
case "$COMMAND" in
|
||||
|
Loading…
Reference in New Issue
Block a user