Re: [OpenWrt-Devel] Question About Interfacing with UCI

2013-08-20 Thread Petr Štetiar
Justyn Bell jbell...@gmail.com [2013-08-19 10:45:59]:

 Firstly, I've read through the documentation here:  
 http://wiki.openwrt.org/doc/uci.  It says UCI is also editable through  
 various programming APIs (like Shell, Lua and C).  Where can I find  
 these APIs?  Specifically the C UCI API.

It's in libuci, package/system/uci or git://nbd.name/uci.git

 Secondly, I'm sort of lost about where the config files in /etc/config  
 get parsed and applied to other applications.  Eg, when I change the  
 configuration in /etc/config/network, and do a /etc/init.d/network  
 restart, where do these configuration values get passed such that the  
 network is updated appropriately? 

This is probably not a good starting point for a beginner. Take a look at
base-files/files/sbin/led.sh, summon 'git grep config_get' for more.

 I couldn't find help on the developers forum, so I decided to try the
 mailing list.

Why would anyone sane spent hours clicking throught those crazy web
interfaces?

-- ynezz
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Question About Interfacing with UCI

2013-08-19 Thread Justyn Bell

Hello all.

I'm developing a custom package that I would like to interface with 
UCI.  That is, I would like to have a config file in /etc/config/ that 
configures my custom package which can be changed via the command line, 
LuCI, or a C application.


Firstly, I've read through the documentation here: 
http://wiki.openwrt.org/doc/uci.  It says UCI is also editable through 
various programming APIs (like Shell, Lua and C).  Where can I find 
these APIs?  Specifically the C UCI API.


Secondly, I'm sort of lost about where the config files in /etc/config 
get parsed and applied to other applications.  Eg, when I change the 
configuration in /etc/config/network, and do a /etc/init.d/network 
restart, where do these configuration values get passed such that the 
network is updated appropriately?  I'm trying to find an existing 
package that does what I'm attempting to do so that I can use it as an 
example to go forward with my own package.


Sorry about the basic question.  I couldn't find help on the developers 
forum, so I decided to try the mailing list.  If this isn't appropriate 
to put here, I'll refrain from doing so in the future.


--
Justyn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel