kirkwood: fix sysupgrade experience for early DSA-adopters
[openwrt/openwrt.git] / target / linux / kirkwood / base-files / etc / uci-defaults / 05_fix-compat-version
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version
new file mode 100644 (file)
index 0000000..d7f8488
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2020 OpenWrt.org
+#
+
+. /lib/functions.sh
+
+case "$(board_name)" in
+       linksys,e4200-v2|\
+       linksys,ea3500|\
+       linksys,ea4500)
+               uci set system.@system[0].compat_version="1.1"
+               uci commit system
+               ;;
+esac
+
+exit 0