kernel-install: recognize /boot/efi mountpoint (#3751)

install everything in /boot/efi, if this is a mountpoint
This commit is contained in:
Harald Hoyer 2016-07-19 12:10:09 +02:00 committed by Lennart Poettering
parent 1efbf65819
commit 340defcd06
2 changed files with 11 additions and 2 deletions

View File

@ -16,7 +16,8 @@ if ! [[ $MACHINE_ID ]]; then
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
LOADER_ENTRY="$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"

View File

@ -86,7 +86,15 @@ if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then
exit 1
fi
BOOT_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
if [[ -d /boot/loader/entries ]] || [[ -d /boot/$MACHINE_ID ]]; then
BOOT_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
elif [[ -d /boot/efi/loader/entries ]] || [[ -d /boot/efi/$MACHINE_ID ]] \
|| mountpoint -q /boot/efi; then
BOOT_DIR_ABS="/boot/efi/$MACHINE_ID/$KERNEL_VERSION"
else
BOOT_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
fi
ret=0
readarray -t PLUGINS < <(