[LEDE-DEV] [PATCH libubox] json_script: enable custom expr handler callback

Denis Osvald denis.osvald at sartura.hr
Thu May 18 00:57:56 PDT 2017


On 2017-05-18 09:39, Denis Osvald wrote:
> This wires in custom expression handler functionality, which was
> present in json script since the original version, but never used.

To add a bit of context:

Experimenting with procd service triggers, it was noticed that when
adding triggers for a network interface, trigger is activated too often.
I saw discussions related to both netifd (as sender of network interface
trigger events) and procd side of the problem a few times during past
months on the list, e.g.:

http://lists.infradead.org/pipermail/lede-dev/2017-April/007065.html
http://lists.infradead.org/pipermail/lede-dev/2017-April/007162.html
http://lists.infradead.org/pipermail/lede-dev/2017-March/006927.html

Quote from the last link:
> be nice if [...] there were ways to be better refine the interface 
> triggers to only a true interface reconfiguration

As one way of solving the problem, I wanted to make a trigger-handling
json_script which itself would check the trigger details, and decide
whether the event was relevant enough to warrant a reload. I tried this
via a patch to procd:

http://public.inteno.se/?p=iopsys.git;a=commitdiff;h=3cdd8f80433e21eacfb593e69361e8f217aba30c

However, json_script turned out not to support custom expression
handlers, hence this patch.

Regards,

Denis



More information about the Lede-dev mailing list