From a07c9e7b4eee728bbc985436078340f0807e0c9d Mon Sep 17 00:00:00 2001 From: pocopico Date: Mon, 5 Jun 2023 09:41:38 +0300 Subject: [PATCH] Fixed leading space in synoinfo key values --- .../board/tcrpfriend/rootfs-overlay/root/VERSION | 2 +- .../board/tcrpfriend/rootfs-overlay/root/boot.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/buildroot/board/tcrpfriend/rootfs-overlay/root/VERSION b/buildroot/board/tcrpfriend/rootfs-overlay/root/VERSION index 8fe6dd4b..7991d28e 100644 --- a/buildroot/board/tcrpfriend/rootfs-overlay/root/VERSION +++ b/buildroot/board/tcrpfriend/rootfs-overlay/root/VERSION @@ -1 +1 @@ -v0.0.5h +v0.0.5i diff --git a/buildroot/board/tcrpfriend/rootfs-overlay/root/boot.sh b/buildroot/board/tcrpfriend/rootfs-overlay/root/boot.sh index fa8bccf3..7693f1ac 100644 --- a/buildroot/board/tcrpfriend/rootfs-overlay/root/boot.sh +++ b/buildroot/board/tcrpfriend/rootfs-overlay/root/boot.sh @@ -2,11 +2,11 @@ # # Author : # Date : 230601 -# Version : 0.0.5h +# Version : 0.0.5i # User Variables : ############################################################################### -BOOTVER="0.0.5h" +BOOTVER="0.0.5i" FRIENDLOG="/mnt/tcrp/friendlog.log" RSS_SERVER="https://raw.githubusercontent.com/pocopico/redpill-load/develop" AUTOUPDATES="1" @@ -33,6 +33,7 @@ function history() { 0.0.5f Updated configs 0.0.5g Enhanced the detection of redpill model 0.0.5h Enhanced the synoinfo key reading to accept multiword keys + 0.0.5i Fixed an a leading space in the synoinfo key reading Current Version : ${BOOTVER} -------------------------------------------------------------------------------------- @@ -220,7 +221,8 @@ function patchramdisk() { while IFS=":" read KEY VALUE; do echo "Key : $KEY Value: $VALUE" - _set_conf_kv ${KEY} "${VALUE}" $temprd/etc/synoinfo.conf + KEY="$(echo $KEY | xargs)" && VALUE="$(echo $VALUE | xargs)" + _set_conf_kv "${KEY}" "${VALUE}" $temprd/etc/synoinfo.conf echo "_set_conf_kv \"${KEY}\" \"${VALUE}\" /tmpRoot/etc/synoinfo.conf" >>"/root/rp.txt" echo "_set_conf_kv \"${KEY}\" \"${VALUE}\" /tmpRoot/etc.defaults/synoinfo.conf" >>"/root/rp.txt" done <<<$(echo $SYNOINFO_PATCH | jq . | grep ":" | sed -e 's/"//g' | sed -e 's/,//g') @@ -229,7 +231,8 @@ function patchramdisk() { while IFS=":" read KEY VALUE; do echo "Key : $KEY Value: $VALUE" - _set_conf_kv ${KEY} "${VALUE}" $temprd/etc/synoinfo.conf + KEY="$(echo $KEY | xargs)" && VALUE="$(echo $VALUE | xargs)" + _set_conf_kv "${KEY}" "${VALUE}" $temprd/etc/synoinfo.conf echo "_set_conf_kv \"${KEY}\" \"${VALUE}\" /tmpRoot/etc/synoinfo.conf" >>"/root/rp.txt" echo "_set_conf_kv \"${KEY}\" \"${VALUE}\" /tmpRoot/etc.defaults/synoinfo.conf" >>"/root/rp.txt" done <<<$(echo $SYNOINFO_USER | jq . | grep ":" | sed -e 's/"//g' | sed -e 's/,//g')