From 7811763ecceb5491944b60e14c6fd60eddb37747 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Sat, 16 Nov 2024 20:51:07 -0800 Subject: [PATCH] Make sure we dont lose the compat_version (#1697) --- files/etc/uci-defaults/11_compat_version | 8 -------- files/usr/local/bin/aredn_init | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 files/etc/uci-defaults/11_compat_version diff --git a/files/etc/uci-defaults/11_compat_version b/files/etc/uci-defaults/11_compat_version deleted file mode 100644 index 281c04c7..00000000 --- a/files/etc/uci-defaults/11_compat_version +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh -VER=$(jsonfilter -e '@.system.compat_version' < /etc/board.json) -if [ "${VER}" != "" ]; then - uci -c /etc/config.mesh -q set setup.globals.compat_version=${VER} - uci -c /etc/config.mesh commit setup - uci -q set system.@system[0].compat_version=${VER} - uci -q commit system -fi diff --git a/files/usr/local/bin/aredn_init b/files/usr/local/bin/aredn_init index 79851545..aef8daf9 100755 --- a/files/usr/local/bin/aredn_init +++ b/files/usr/local/bin/aredn_init @@ -175,6 +175,12 @@ if wifi_enable == 0 then cfg.wifi_enable = wifi_enable end +-- Make sure compat version is correct +local system = aredn.hardware.get_board().system +if system and system.compat_version then + cfg.compat_version = system.compat_version +end + -- Radio if aredn.hardware.get_radio_count() > 0 and cfg.wifi_intf == "" then local wifi_intf = "wlan0"