Hi!
I am trying to use "ubus uci" to delete an item in a list. It is possible?
=> Config: My config is lyke this:
config wifi-iface 'ssid1'
option ssid 'xyz'
list mac_list 'AA:BB:CC:12:34:33'
list mac_list 'AA:BB:CC:12:34:56'
=> By UCI, is simple to delete:
# uci del_list wireless.ssid1.mac_list=AA:BB:CC:12:34:56
By the way, I want to delete this specif MAC using ubus:
=> UBUS delete
I can not find a way to delete a item inside a list. Always delete the section or the option
According the help
# ubus list uci -v
"delete":"config":"String","section":"String","type":"String","match":"Table","option":"String","options":"Array","ubus_rpc_session":"String"}
And I've tried in any ways, lie below, without result.
ubus call uci delete '{"config":"wireless","section":"ssid1","type":"String","option":"mac_list","options":{"Value":["AA:BB:CC:12:34:56"]}}'
ubus call uci delete '{"config":"wireless","section":"ssid1","type":"String","option":"mac_list","match":{"value":["AA:BB:CC:12:34:56"]}}'
=> UBUS GET, just to see:
# ubus call uci get '{"config":"wireless","section":"ssid1","option":"mac_list"'}
{
"value": [
"AA:BB:CC:12:34:33",
"AA:BB:CC:12:34:56"
]
}
Thanks!
(Last edited by rrvirtual on 15 Dec 2017, 18:48)