From 97551828d44f3f0e79598a9a757e2599c4a0d7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Fri, 20 Sep 2024 15:45:17 +0200 Subject: [PATCH] configuration migrate: Remove duplicate infix-meta:version when migrate config when migrate configs the yang data produced was this: "infix-meta:meta": { version: "1.0" "infix-meta:version": "1.1" }, duplicate node, resulting in failed migration of startup configuration, always replace whole node. --- board/common/rootfs/usr/libexec/infix/init.d/30-cfg-migrate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/30-cfg-migrate b/board/common/rootfs/usr/libexec/infix/init.d/30-cfg-migrate index a8b03abd4..496ac7ea3 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/30-cfg-migrate +++ b/board/common/rootfs/usr/libexec/infix/init.d/30-cfg-migrate @@ -93,7 +93,7 @@ for version_dir in $(find "$MIGRATIONS_DIR" -mindepth 1 -maxdepth 1 -type d | so done # Update the JSON file to the latest version -if jq --arg version "$sys_version" '.["infix-meta:meta"]["infix-meta:version"] = $version' "$CONFIG_FILE" \ +if jq --arg version "$sys_version" '.["infix-meta:meta"] = {"infix-meta:version": $version}' "$CONFIG_FILE" \ > "${CONFIG_FILE}.tmp" && mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE"; then note "Configuration updated to version $sys_version." else