Skip to content

Commit

Permalink
fix(lsinitrd.sh): always check that MACHINE_ID is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
aafeijoo-suse authored and johannbg committed May 3, 2022
1 parent 527fdfa commit d634314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lsinitrd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down

0 comments on commit d634314

Please sign in to comment.