mwan3: also show tracker state via ubus
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 15 Sep 2023 09:44:41 +0000 (11:44 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Wed, 20 Sep 2023 14:10:06 +0000 (16:10 +0200)
The tracker state is not shown via ubus. Only if the tracker was in
active state, then the boolean running was set or not. By adding the
tracking state to the ubus information we could also evaluate the state
of the tracker. To remain compatible, the runnig flag of the tracker is
not removed, which in fact displays the same information, but only if
the tracker is in state 'active' or not.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/mwan3/Makefile
net/mwan3/files/usr/libexec/rpcd/mwan3

index 606992b6168ed85ce3598da35801ebf1687145a7..d6d2075aa72a7fef886d08b944d3ae835f24d284 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.11.10
+PKG_VERSION:=2.11.11
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
                Aaron Goodman <aaronjg@alumni.stanford.edu>
index eccd10196c3c8982a7b138c560b848cd4e65ddb8..4bd2b631f6263bdcb2ca814fa6c29cc6d6db076c 100755 (executable)
@@ -127,6 +127,7 @@ get_mwan3_status() {
        json_add_string "status" "${status}"
        json_add_boolean "enabled" "${enabled}"
        json_add_boolean "running" "${running}"
+       json_add_string "tracking" "${track_status}"
        json_add_boolean "up" "${up}"
        json_add_array "track_ip"
        for file in $MWAN3TRACK_STATUS_DIR/${iface}/TRACK_*; do