tar2fs: Set UUID in extlinux.conf, if exist

extlinux.conf is not tied to the u-boot bootloader and always
needed replace Label with the UUID if the file exist.
This commit is contained in:
Anton Midyukov 2020-09-09 23:10:07 +07:00
parent 576a58d1c6
commit b07db07061

View File

@ -360,11 +360,13 @@ popd
[ -f "$ROOTFS/boot/efi/cmdline.txt" ] && [ -f "$ROOTFS/boot/efi/cmdline.txt" ] &&
sed -i "s/LABEL=ROOT/$ROOTDEV/" "$ROOTFS/boot/efi/cmdline.txt" sed -i "s/LABEL=ROOT/$ROOTDEV/" "$ROOTFS/boot/efi/cmdline.txt"
# Update extlinux.conf
[ -f "$ROOTFS/boot/extlinux/extlinux.conf" ] &&
sed -i "s/LABEL=ROOT/$ROOTDEV/g" "$ROOTFS/boot/extlinux/extlinux.conf"
# Setup bootloader # Setup bootloader
case "$BOOTLOADER" in case "$BOOTLOADER" in
uboot) uboot)
EXTLINUX_CONF="$ROOTFS/boot/extlinux/extlinux.conf"
sed -i "s/LABEL=ROOT/$ROOTDEV/g" "$EXTLINUX_CONF"
parting set "$ROOTPART" boot on parting set "$ROOTPART" boot on
;; ;;
lilo) lilo)