redefine variable names for partition labels

This commit is contained in:
Tomas Kelemen (vudiq) 2018-05-30 08:31:04 +02:00
parent e0c8006ae0
commit c2792f5dbb
5 changed files with 15 additions and 15 deletions

View File

@ -211,6 +211,6 @@
# Default supported get handlers (archive, git, file etc.)
GET_HANDLER_SUPPORT="archive"
# Partition labels
DISTRO_FAT_VOLUME_LABEL="LIBREELEC"
DISTRO_STORAGE_VOLUME_LABEL="STORAGE"
# Partition labels for USB/SD installation media
DISTRO_BOOTLABEL="LIBREELEC"
DISTRO_DISKLABEL="STORAGE"

View File

@ -218,8 +218,8 @@ 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" \
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \
-i $INSTALL/platform_init
chmod 755 $INSTALL/platform_init
fi

View File

@ -71,15 +71,15 @@ makeinstall_target() {
# Replace partition names in update.sh
if [ -f "$INSTALL/usr/share/bootloader/update.sh" ] ; then
sed -e "s/@BOOT_LABEL@/$DISTRO_FAT_VOLUME_LABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_STORAGE_VOLUME_LABEL/g" \
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \
-i $INSTALL/usr/share/bootloader/update.sh
fi
# Replace labels in boot.ini
if [ -f "$INSTALL/usr/share/bootloader/boot.ini" ] ; then
sed -e "s/@BOOT_LABEL@/$DISTRO_FAT_VOLUME_LABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_STORAGE_VOLUME_LABEL/g" \
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \
-i $INSTALL/usr/share/bootloader/boot.ini
fi

View File

@ -92,15 +92,15 @@ makeinstall_target() {
# Replace partition names in update.sh
if [ -f "$INSTALL/usr/share/bootloader/update.sh" ] ; then
sed -e "s/@BOOT_LABEL@/$DISTRO_FAT_VOLUME_LABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_STORAGE_VOLUME_LABEL/g" \
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \
-i $INSTALL/usr/share/bootloader/update.sh
fi
# Replace labels in boot.ini
if [ -f "$INSTALL/usr/share/bootloader/boot.ini" ] ; then
sed -e "s/@BOOT_LABEL@/$DISTRO_FAT_VOLUME_LABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_STORAGE_VOLUME_LABEL/g" \
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \
-i $INSTALL/usr/share/bootloader/boot.ini
fi
}

View File

@ -71,8 +71,8 @@ trap cleanup SIGINT
UUID_2=$(date '+%M%S')
FAT_SERIAL_NUMBER="${UUID_1}${UUID_2}"
UUID_SYSTEM="${UUID_1}-${UUID_2}"
FAT_VOLUME_LABEL="${DISTRO_FAT_VOLUME_LABEL}"
STORAGE_VOLUME_LABEL="${DISTRO_STORAGE_VOLUME_LABEL}"
FAT_VOLUME_LABEL="${DISTRO_BOOTLABEL}"
STORAGE_VOLUME_LABEL="${DISTRO_DISKLABEL}"
# create an image
echo