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"