>>> prepend 'uci' to 'commit network'
>> Can you explain why the prepend of 'uci' is required ?
>> In other words what is not working as I fail to spot the issue
>
> I think the author is right. "commit" is no command but an argument to the 
> uci command.
> I've tested the script and it works fine for me ..
> So I want to understand what is failing ...

uci-defaults "scripts" are implemented here:
https://github.com/openwrt/openwrt/blob/master/package/base-files/files/lib/functions.sh#L256-L263

As you see, after all of them have been sourced a global "uci commit" is called 
anyway.

So, after all, the "uci commit something" statements in uci-defaults files are 
actually not strictly necessary. However, many authors prefer to have committed 
what they touch directly in the uci-defaults script.
This is handled relatively inconsistently across OpenWrt main/packages repos, I 
once had a look into it and found that it was about 50:50 back then (having a 
commit in the file vs. not having it).

However, I'd still expect the "commit network" to produce some error anywhere.

But instead of adding the "uci" in front, another working solution would be to 
just drop the line entirely.

Best

Adrian

Attachment: openpgp-digital-signature.asc
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to