On Tue, Jan 24, 2017 at 12:07 AM, Bastian Bittorf <b...@npl.de> wrote: > * Dave Taht <dave.t...@gmail.com> [24.01.2017 08:52]: >> I'd love a "simple ubus listen daemon example - one that listens >> merely for events on a set of interfaces. or routes or on a proto". > > root@box:~ ubus listen > { "network.interface": {"action":"ifdown","interface":"lan"} } > { "network.interface": {"action":"ifup","interface":"lan"} } > >> For all I know there's better tools for looking at ubus but my head >> spins from installing my post-eyeball json checker. I'd like to for >> example be checking that everything is always correctly formatted json >> passing through... is there a way to do that? While, like, um, >> hammering ubus? > > . /usr/share/libubox/jshn.sh > MYJSON="$( devstatus eth0.2 )" > json_load "$MYJSON" || something_is_wrong > json_cleanup > > bye, bastian
Thx very much. Also blogic pointed me at the jsonfilter package, which is a godsend. -- Dave Täht Let's go make home routers and wifi faster! With better software! http://blog.cerowrt.org _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev