From 9cac3db003d075f306db60542d6f4a2b6b045769 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Wed, 3 Nov 2021 13:25:06 -0700 Subject: [PATCH] aredn: Meshoween - Bug fixes (#158) Create meshstatus section if missing --- files/www/cgi-bin/mesh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/www/cgi-bin/mesh b/files/www/cgi-bin/mesh index 23d41fe5..a139d651 100755 --- a/files/www/cgi-bin/mesh +++ b/files/www/cgi-bin/mesh @@ -84,6 +84,10 @@ use perlfunc; ); # Limit displayed nodes and services to the most reachable routes if memory on the node is small +if ( `/sbin/uci -q get aredn.\@meshstatus[0]` eq "" ) +{ + system "(/sbin/uci -q add aredn meshstatus; /sbin/uci -q commit aredn) > /dev/null"; +} %lowMemoryLimits = ( memory => `/sbin/uci -q get aredn.\@meshstatus[0].lowmem` || 10000, routes => `/sbin/uci -q get aredn.\@meshstatus[0].lowroutes` || 1000,