platform_init: use labels defined by distro options

This commit is contained in:
Tomas Kelemen (vudiq) 2018-05-29 09:23:01 +02:00
parent ba307e3366
commit efe33a0a96
2 changed files with 4 additions and 1 deletions

View File

@ -218,6 +218,9 @@ makeinstall_init() {
if find_file_path initramfs/platform_init; then
cp ${FOUND_PATH} $INSTALL
sed -e "s/@BOOT_LABEL@/$DISTRO_FAT_VOLUME_LABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_STORAGE_VOLUME_LABEL/g" \
-i $INSTALL/platform_init
chmod 755 $INSTALL/platform_init
fi

View File

@ -44,7 +44,7 @@ done
if [ -z "$BOOT_IMAGE" -o -z "$boot" -o -z "$disk" ]; then
cmdline=$(cat /proc/cmdline)
if [ -n "$bootfromext" ]; then
cmdline="$cmdline BOOT_IMAGE=kernel.img boot=LABEL=LIBREELEC disk=LABEL=STORAGE"
cmdline="$cmdline BOOT_IMAGE=kernel.img boot=LABEL=@BOOT_LABEL@ disk=LABEL=@DISK_LABEL@"
else
cmdline="$cmdline BOOT_IMAGE=/dev/boot boot=/dev/system disk=/dev/data"
fi