generalize /boot search
This commit is contained in:
parent
85e54ebe4b
commit
117c2c04fd
@ -70,17 +70,21 @@ pvm_mount() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# find the boot partition
|
# find the boot partition
|
||||||
bootpart="$(findmnt -senF "$workdir"/etc/fstab /boot | awk '{print $2}')"
|
if (( $(find /boot/ -name initramfs-* | wc -l) > 0 )) && \
|
||||||
|
(( $(find /boot/ -name vmlinuz-* | wc -l) > 0 )); then
|
||||||
if [ -n "$bootpart" ]; then
|
msg "found /boot on root filesystem partition"
|
||||||
msg "found boot filesystem partition: %s" "$bootpart"
|
|
||||||
else
|
else
|
||||||
error "%s: unable to determine boot partition." "$imagefile"
|
bootpart="$(findmnt -senF "$workdir"/etc/fstab /boot | awk '{print $2}')"
|
||||||
return "$EXIT_FAILURE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# mount and be happy
|
if [ -n "$bootpart" ]; then
|
||||||
sudo mount "$bootpart" "$workdir"/boot || return
|
# mount and be happy
|
||||||
|
msg "found boot filesystem partition: %s" "$bootpart"
|
||||||
|
sudo mount "$bootpart" "$workdir"/boot || return "$EXIT_FAILURE"
|
||||||
|
else
|
||||||
|
error "%s: unable to determine boot filesystem partition." "$imagefile"
|
||||||
|
return "$EXIT_FAILURE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pvm_umount() {
|
pvm_umount() {
|
||||||
|
Loading…
Reference in New Issue
Block a user