On Sat, Apr 4, 2020 at 9:04 PM <[email protected]> wrote: > >>> 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). > I observed the same inconsistency across the code base which makes it hard to refer to a default way of working
> > However, I'd still expect the "commit network" to produce some error > anywhere. > I did not see an issue when doing a quick test as the global 'uci commit' covered up the issue for me > > But instead of adding the "uci" in front, another working solution would > be to just drop the line entirely. > Agree and I would prefer this solution Thx, Hans > > Best > > Adrian >
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
