From 7074702d900893b70060a13a2f5e2f7627ccfcfe Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sun, 19 May 2024 17:20:00 +0200 Subject: [PATCH] init: add upgrade fix for old configs Signed-off-by: AuxXxilium --- files/initrd/opt/arc/init.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index 40d7770f..1bddb6d3 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -51,7 +51,12 @@ initConfigKey "arc.key" "" "${USER_CONFIG_FILE}" initConfigKey "arc.macsys" "hardware" "${USER_CONFIG_FILE}" initConfigKey "arc.odp" "false" "${USER_CONFIG_FILE}" initConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}" -initConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" +ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}" 2>/dev/null)" +if [ -n "${ARCCONF}" ]; then + writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" +else + writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" +fi initConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}" initConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}" initConfigKey "arc.sn" "" "${USER_CONFIG_FILE}"