]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: recognize /boot/efi mountpoint (#3751)
authorHarald Hoyer <harald@redhat.com>
Tue, 19 Jul 2016 10:10:09 +0000 (12:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Jul 2016 10:10:09 +0000 (12:10 +0200)
install everything in /boot/efi, if this is a mountpoint

src/kernel-install/90-loaderentry.install
src/kernel-install/kernel-install

index 4c9b1f0327aaae666afbad2771c12f8b9d2b3b47..a0bca05c9a17579d7a4bc5b80bad948fdc65d173 100644 (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"
index 3ae1d77e33e026507891a84076d1fc6c5a1065bf..1159dc384d8eae5fd238132188011927de3e1c37 100644 (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 < <(