[OpenWrt-Devel] [PATCH][libubox] json_script: add "isdir" support

Felix Fietkau nbd at openwrt.org
Sun Feb 14 16:00:55 EST 2016


On 2016-02-13 11:08, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
> This is intended for use by hotplug system to check whether
> /etc/hotplug.d/%SUBSYSTEM% is a directory
> 
>  examples/json_script-example.json |  5 +++++
>  json_script.c                     | 26 ++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)
> 
> diff --git a/examples/json_script-example.json b/examples/json_script-example.json
> index 45636b7..5328e59 100644
> --- a/examples/json_script-example.json
> +++ b/examples/json_script-example.json
> @@ -27,6 +27,11 @@
>      [ "exec_if_or", "%ORVAR%" ]
>    ],
>  
> +  [ "if",
> +	[ "isdir", "%ISDIRVAR%" ],
> +	[ "exec_isdir", "%ISDIRVAR%" ]
This exec line looks wrong, please fix.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list