Content-Length: 257513 | pFad | http://github.com/seamustuohy/luci_tutorials/blob/master/08-uci.md

98 luci_tutorials/08-uci.md at master · seamustuohy/luci_tutorials · GitHub
Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.27 KB

08-uci.md

File metadata and controls

46 lines (29 loc) · 1.27 KB

07-warnings.md ← | → 09-LuCI-objects.md

The UCI system

Writing bash scripts using the /lib/config/uci.sh or the uci command line functions

Setting uci anonymously named sections

if you have a uci config that has sections with only section types and no stated name there is a special syntax for modifying them

config system
    list affects 'luci_statistics'
    option init 'avahi-daemon'

config system
    list affects 'luci_statistics'
    option init 'pineapple'

You can use the command line interface to modify only the first like this:

uci set ucitrack.@system[0].init=new-value

You can use the /lib/config/uci.sh scripts to do it like this

uci_set ucitrack @system[0] init new-value

You can access the last in one of two ways:

uci set ucitrack.@system[-1].init=new-value
uci set ucitrack.@system[1].init=new-value

[-1] will get the last section. [-2] will get the second from last, and etc.

You don't even have to specify the config type. uci set ucitrack.@[-1].init=new-value

This will take the last section in the config file and modify it.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/seamustuohy/luci_tutorials/blob/master/08-uci.md

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy