Hi.
> section types with dashes also produce problems.
> Reading might work fine but setting, modifying and restore/import do not.

Works just fine:

-- >8 --
root@jj:~# touch /etc/config/sample
root@jj:~# uci set sample.section_A=type-A
root@jj:~# uci commit sample
root@jj:~# cat /etc/config/sample

config type-A 'section_A'

-- 8< --

> #> uci set test.test-1='test-1'
> uci: Invalid argument

Thats because the first "test-1" is the name, not the type.
The above call would result in "config test-1 test-1" which is invalid.

> #> uci set test.test_1='test-1'

That works because "test_1" is a legal identifier:
  "config test-1 test_1"

> #> uci set test.test-1.x='15'
> uci: Invalid argument

Actually the same as your 1st example, just with "x" as type instead of
"test-1".


It seems you confused the order of arguments in your tries, the syntax is

  uci set config.sectionname=sectiontype

... and not

  uci set config.sectiontype=sectionname

HTH,
Jow
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users

Reply via email to