[OpenWrt-Devel] [PATCH] netifd: fix 14_migrate-dhcp-release script

mail at adrianschmutzler.de mail at adrianschmutzler.de
Sat Apr 4 15:04:26 EDT 2020

>>> 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:

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200404/8fb7abc6/attachment.sig>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list