I am writing a (posix) shell script that modifies config files located in /etc/config
. I already understand how to use callbacks and config_foreach
etc.
To perform the modifications, should I use:
-
uci set
(as explained in the documentation), or ... -
config_set
(prominently documented in "Configuration in scripts" but then, as an afterthought, described as "arcane and buggy" and effectively deprecated), or ... -
uci_set
(a thin wrapper arounduci set
, defined inuci.sh
. "Configuration in scripts" suggests using this wrapper, but as I know that my config files are in/etc/config
, then I think that this wrapper brings me no benefit.), or ... -
uci_set_state
(also defined inuci.sh
, but specifically modifies the contents of/var/state
. Again, as my config files are in/etc/config
, this wrapper brings me no benefit. Also, this says "uci state vars are deprecated" so possibly this function is also deprecated) ?
I think that option 1 (uci set
) wins here. Is this the general consensus?
TIA.