mkimage-profiles/features.in/syslinux/scripts.d/20-propagator-ramdisk-syslinux
Anton Midyukov 00283166b7 syslinux: fixed for using BOOTLOADER not equal syslinux
Do not create syslinux.cfg if EFI_BOOTLOADER is set to not equal grub-efi.
2020-04-03 22:56:58 +07:00

17 lines
438 B
Bash
Executable File

#!/bin/sh
# postprocess isolinux configuration
# when the image sizes are finally known
# NB: install2_size, live_size, rescue_size get defined here
cd "$WORKDIR"
[ -d "syslinux" ] || exit 0
# apply size census while looking for potential squashfs images
find -maxdepth 1 -type f -size +1M \
| sed 's,^\./,,' \
| while read image; do
size="$[ $(stat -c%s "$image") / 1024 + 1 ]"
sed -i "s,@${image}_size@,$size," syslinux/*.cfg
done