From dba67f8d42f56c33d846b3d71c6726c63a86e8e9 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Wed, 2 Oct 2024 22:57:56 +0200 Subject: [PATCH] tree: fix syntax Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc.sh | 10 +++++----- files/initrd/opt/arc/init.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 17cfb968..5c35beb6 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -556,8 +556,8 @@ function arcPatch() { writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" fi elif [ "${ARCMODE}" == "config" ]; then - CONFIGSVERSION="$(cat "${MODEL_CONFIG_PATH}/VERSION" | sed -e 's/\.//g' | sed 's/[^0-9]*//g' )" - LOADERVERSION="$(echo "${ARC_VERSION}" | sed -e 's/\.//g' | sed 's/[^0-9]*//g' )" + CONFIGSVERSION="$(cat "${MODEL_CONFIG_PATH}/VERSION" | sed -e 's/\.//g' | sed 's/[^0-9]*//g')" + LOADERVERSION="$(echo "${ARC_VERSION}" | sed -e 's/\.//g' | sed 's/[^0-9]*//g')" CONFHASHFILE="$(sha256sum "${S_FILE}" | awk '{print $1}')" CONFHASH="$(readConfigKey "arc.confhash" "${USER_CONFIG_FILE}")" if [ ${CONFIGSVERSION} -lt ${LOADERVERSION} ] || [ "${CONFHASH}" != "${CONFHASHFILE}" ] || [ -z "${ARCCONF}" ]; then @@ -571,7 +571,7 @@ function arcPatch() { [ -z "${resp}" ] && return 1 if [ ${resp} -eq 1 ]; then # Generate random Serial - SN=$(generateSerial "${MODEL}" "false" | tr '[:lower:]' '[:upper:]') + SN="$(generateSerial "${MODEL}" "false" | tr '[:lower:]' '[:upper:]')" writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" elif [ ${resp} -eq 2 ]; then while true; do @@ -600,11 +600,11 @@ function arcPatch() { [ -z "${resp}" ] && return 1 if [ ${resp} -eq 1 ]; then # Read Arc Patch from File - SN=$(generateSerial "${MODEL}" "true" | tr '[:lower:]' '[:upper:]') + SN="$(generateSerial "${MODEL}" "true" | tr '[:lower:]' '[:upper:]')" writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" elif [ ${resp} -eq 2 ]; then # Generate random Serial - SN=$(generateSerial "${MODEL}" "false" | tr '[:lower:]' '[:upper:]') + SN="$(generateSerial "${MODEL}" "false" | tr '[:lower:]' '[:upper:]')" writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" elif [ ${resp} -eq 3 ]; then while true; do diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index 39433bc6..b6133b5d 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -13,8 +13,8 @@ checkBootLoader || die "The loader is corrupted, please rewrite it!" BUS=$(getBus "${LOADER_DISK}") # Sanity Check -CONFIGSVERSION="$(cat "${MODEL_CONFIG_PATH}/VERSION" | sed -e 's/\.//g' | sed 's/[^0-9]*//g' )" -LOADERVERSION="$(echo "${ARC_VERSION}" | sed -e 's/\.//g' | sed 's/[^0-9]*//g' )" +CONFIGSVERSION="$(cat "${MODEL_CONFIG_PATH}/VERSION" | sed -e 's/\.//g' | sed 's/[^0-9]*//g')" +LOADERVERSION="$(echo "${ARC_VERSION}" | sed -e 's/\.//g' | sed 's/[^0-9]*//g')" CONFHASHFILE="$(sha256sum "${S_FILE}" | awk '{print $1}')" CONFHASH="$(readConfigKey "arc.confhash" "${USER_CONFIG_FILE}")" [ -z "${CONFHASH}" ] && CONFHASH="${CONFHASHFILE}"