I've been playing around with uci and something is not really clear to me. Lets say I want to add and item:
firewall.@zone[1].network='wan'
result:
firewall.@zone[1].network='wan' 'wan6'
or delete an item:
firewall.@zone[1].network='wan' 'wan6'
result:
firewall.@zone[1].network='wan'
How does this work?
pavelgl
2
root@Office:~# uci show firewall.@zone[1].network
firewall.cfg03dc81.network='wan' 'wan6' 'wg0'
Add an entry to the list
root@Office:~# uci add_list firewall.@zone[1].network='wanb'
root@Office:~# uci show firewall.@zone[1].network
firewall.cfg03dc81.network='wan' 'wan6' 'wg0' 'wanb'
Delete an entry from the list
root@Office:~# uci del_list firewall.@zone[1].network='wg0'
root@Office:~# uci show firewall.@zone[1].network
firewall.cfg03dc81.network='wan' 'wan6' 'wanb'
Replace the contents of the list with a single option
root@Office:~# uci set firewall.@zone[1].network='wg0'
root@Office:~# uci show firewall.@zone[1].network
firewall.cfg03dc81.network='wg0'
Delete all entries for a specific option
root@Office:~# uci del firewall.@zone[1].network
root@Office:~# uci show firewall.@zone[1].network
uci: Entry not found
4 Likes
Thanks a lot
(and there I was so convinced of 'set' being right )
1 Like
system
Closed
4
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.