From: Antonio Alvarez Feijoo Date: Tue, 3 May 2022 13:37:42 +0000 (+0200) Subject: fix(lsinitrd.sh): always check that MACHINE_ID is not empty X-Git-Tag: 057~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6343146c1db69fc724ca666a5d9321af7fd0d46;p=thirdparty%2Fdracut.git fix(lsinitrd.sh): always check that MACHINE_ID is not empty --- diff --git a/lsinitrd.sh b/lsinitrd.sh index 4175e4d8c..39be169df 100755 --- a/lsinitrd.sh +++ b/lsinitrd.sh @@ -133,9 +133,11 @@ else image="/lib/modules/${KERNEL_VERSION}/initrd" elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then image="/boot/initramfs-${KERNEL_VERSION}.img" - elif mountpoint -q /efi; then + elif [[ $MACHINE_ID ]] \ + && mountpoint -q /efi; then image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd" - elif mountpoint -q /boot/efi; then + elif [[ $MACHINE_ID ]] \ + && mountpoint -q /boot/efi; then image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd" else image=""