[PATCH v3] procd: add procd json output to init

Petr Štetiar ynezz at true.cz
Thu Dec 17 04:12:21 EST 2020


Florian Eckert <fe at dev.tdt.de> [2020-12-17 09:40:08]:

Hi,

> By adding the extra command `procd` it is now possible to retrieve all
> relevant data from a procd started service directly via the init script.
> 
> Until now, you have to query the ubus to get the information with the
> following command.
> 
> `ubus call service list '{"name":"<xxx>","verbose":true}'`
> 
> With this change, the init script is now extend with the command to get
> this information easier.

I still lack the information about your use case, how do you use this output
of this command.

BTW it looks like you're doing something similar to what we're already doing
in the `status` command.

Maybe you just want to implement `status_verbose` (or such) command with all
the details you would like to get, but in human readable format?

I see the service command as CLI mainly for end users, so in my oppinion it
should provide human readable output.

> +	json_init
> +	json_add_string name "$service"
> +	json_add_boolean verbose "1"
> +	json_add_string name "$service"

Duplicate json_add_string line.

-- ynezz



More information about the openwrt-devel mailing list