Skip to content

Commit d634314

Browse files
aafeijoo-susejohannbg
authored andcommitted
fix(lsinitrd.sh): always check that MACHINE_ID is not empty
1 parent 527fdfa commit d634314

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: lsinitrd.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ else
133133
image="/lib/modules/${KERNEL_VERSION}/initrd"
134134
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
135135
image="/boot/initramfs-${KERNEL_VERSION}.img"
136-
elif mountpoint -q /efi; then
136+
elif [[ $MACHINE_ID ]] \
137+
&& mountpoint -q /efi; then
137138
image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
138-
elif mountpoint -q /boot/efi; then
139+
elif [[ $MACHINE_ID ]] \
140+
&& mountpoint -q /boot/efi; then
139141
image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
140142
else
141143
image=""

0 commit comments

Comments
 (0)