fix: ordering, paths

This commit is contained in:
Peter Šurda 2021-03-02 21:20:17 +01:00
parent 1ec42b9c79
commit 0b8f5982f4
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
2 changed files with 11 additions and 5 deletions

View File

@ -16,9 +16,10 @@ function update_syslinux_menu()
find_newest "$drive"
> "$mnt"/items.cfg
> "$mnt"/syslinux/items.cfg
if [ -n "$newest" ]; then
echo "DEFAULT cloud-init-$newest" >> "$mnt"/items.cfg
version_from_partnum "$drive" "$newest"
echo "DEFAULT cloud-init-$version" >> "$mnt"/syslinux/items.cfg
fi
partition_list "$drive"
@ -28,12 +29,16 @@ function update_syslinux_menu()
continue
fi
versions["$version"]=1
missing=""
for f in "${files[@]}"; do
if [ ! -e "$mnt"/"$imagepath"/"$f""$version" ]; then
continue
missing="1"
fi
done
cat >> "$mnt"/items.cfg << _EOL_
if [ -n "$missing" ]; then
continue
fi
cat >> "$mnt"/syslinux/items.cfg << _EOL_
LABEL cloud-init-$version
MENU LABEL Ubuntu focal (MAAS $version)

View File

@ -47,6 +47,8 @@ function install_syslinux()
dd bs=440 count=1 conv=notrunc \
if=/usr/lib/syslinux/mbr/gptmbr.bin of="$drive"
syslinux "$partition"
mount_efi "$drive"
# legacy
@ -62,7 +64,6 @@ function install_syslinux()
cp syslinux/syslx64.cfg "$mnt"/EFI/BOOT
umount_efi
syslinux "$partition"
}
# vim: set ft=sh: