aredn: Meshoween - Bug fixes (#158)

Create meshstatus section if missing
This commit is contained in:
Tim Wilkinson 2021-11-03 13:25:06 -07:00 committed by GitHub
parent 134532ab2a
commit 9cac3db003
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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,