diff --git a/pacman-zbm-syslinux-regen.sh b/pacman-zbm-syslinux-regen.sh index d59aafa..0b91447 100644 --- a/pacman-zbm-syslinux-regen.sh +++ b/pacman-zbm-syslinux-regen.sh @@ -15,12 +15,15 @@ if [[ "$(<<<"${boot_fs}" wc -l)" -gt '1' ]]; then exit 1 fi -boot_disk="$(lsblk --output 'NAME' --json --tree | jq --raw-output '.[][] | select(.children | length > 0) | select(.children[].name=="'"${boot_fs}"'") | .name')" +boot_fs_name="$(basename "${boot_fs}")" +boot_disk="$(lsblk --output 'NAME' --json --tree | jq --raw-output '.[][] | select(.children | length > 0) | select(.children[].name=="'"${boot_fs_name}"'") | .name')" if [[ ! "${boot_disk}" ]]; then # There's no parent drive over "${boot_fs}" meaning "${boot_fs}" itself # already is the parent. This is a file system on a drive and not on a # partition. boot_disk="${boot_fs}" +else + boot_disk='/dev/'"${boot_disk}" fi find "${boot_dir}" -type f -iname '*.c32' -delete