Adding an application, updating UCI


I am developing a new application, a daemon for Openwrt. For addressing custom needs. I'd like to centralize its configuration file in UCI, and retrieve its configuration from UCI using the c library (libuci). Before that, I'm trying to amend the configuration to add its section. Let's say my application is called "foobar".

# uci add foobar connection
uci: Entry not found
# echo $?

Or if I type in:

# uci set
uci: Entry not found
# echo $?

What am I missing here? How can I do that? Is it even possible to amend the UCI system to add new application?

I don't think UCI creates new config files. Can you imagine that if you made a typo on any command and instead of rejecting it you ended up with another random file and no sense that something went wrong?

Just touch foobar first to create the file.

1 Like


uci import foobar < /dev/null

(found here)


1 Like