[type/__uci*] Update man pages

This commit is contained in:
Dennis Camera 2020-10-24 10:01:49 +02:00
parent c37253b852
commit fe26c119b5
3 changed files with 52 additions and 26 deletions

View File

@ -3,23 +3,22 @@ cdist-type__uci(7)
NAME NAME
---- ----
cdist-type__uci - Manage configuration values in OpenWrt's cdist-type__uci - Manage configuration values in UCI
Unified Configuration Interface (UCI)
DESCRIPTION DESCRIPTION
----------- -----------
This cdist type can be used to alter configuration options in OpenWrt's UCI This cdist type can be used to alter configuration options in OpenWrt's
system. Unified Configuration Interface (UCI) system.
Options can be applied in batches if the `--transaction` parameter is used. Options can be applied in batches if the ``--transaction`` parameter is used.
REQUIRED PARAMETERS REQUIRED PARAMETERS
------------------- -------------------
value value
The value to be set. Can be used multiple times. The value to be set. Can be used multiple times.
This parameter is allowed to be omitted if `--state` is `absent`. This parameter is ignored if ``--state`` is ``absent``.
Due to the way cdist handles arguments, values **must not** contain newline Due to the way cdist handles arguments, values **must not** contain newline
characters. characters.
@ -28,10 +27,10 @@ value
OPTIONAL PARAMETERS OPTIONAL PARAMETERS
------------------- -------------------
state state
`present` or `absent`, defaults to `present`. ``present`` or ``absent``, defaults to ``present``.
transaction transaction
The name of the transaction this option belongs to. The name of the transaction this option belongs to.
If none is given: "default" is used. If none is given: ``default`` is used.
BOOLEAN PARAMETERS BOOLEAN PARAMETERS

View File

@ -3,14 +3,16 @@ cdist-type__uci_commit(7)
NAME NAME
---- ----
cdist-type__uci_commit - Commit a UCI transaction. cdist-type__uci_commit - Commit UCI transactions
DESCRIPTION DESCRIPTION
----------- -----------
This type executes the "uci commit" command on the target. This type executes the ``uci commit`` command on the target with the commands
It is usually not required to use this type. Use the `--transaction` parameter queued in a transaction.
of `cdist-type__uci`\ (7) instead. It is usually not required to use this type. Use the ``--transaction`` parameter
of :strong:`cdist-type__uci`\ (7) and :strong:`cdist-type__uci_section`\ (7)
instead.
REQUIRED PARAMETERS REQUIRED PARAMETERS
@ -42,7 +44,7 @@ EXAMPLES
SEE ALSO SEE ALSO
-------- --------
:strong:`cdist-type__uci`\ (7) :strong:`cdist-type__uci`\ (7), :strong:`cdist-type__uci_section`\ (7)
AUTHORS AUTHORS

View File

@ -3,21 +3,23 @@ cdist-type__uci_section(7)
NAME NAME
---- ----
cdist-type__uci_section - Manage configuration sections in OpenWrt's cdist-type__uci_section - Manage configuration sections in UCI
Unified Configuration Interface (UCI)
DESCRIPTION DESCRIPTION
----------- -----------
This cdist type can be used to replace whole configuration sections in OpenWrt's This cdist type can be used to replace whole configuration sections in OpenWrt's
UCI system. Unified Configuration Interface (UCI) system.
It can be thought of as syntactic sugar for `cdist-type__uci`\ (7), as this type It can be thought of as syntactic sugar for :strong:`cdist-type__uci`\ (7),
will generate the required `__uci` objects to make the section contain exactly as this type will generate the required `__uci` objects to make the section
the options specified via ``--option``. contain exactly the options specified using ``--option``.
Since many default UCI sections are unnamed, this type allows to find the Since many default UCI sections are unnamed, this type allows to find the
matching section by one of its options using the ``--match`` parameter. matching section by one of its options using the ``--match`` parameter.
**NOTE:** Options already present on the target and not listed in ``--option``
or ``--list`` will be deleted.
REQUIRED PARAMETERS REQUIRED PARAMETERS
------------------- -------------------
@ -28,18 +30,18 @@ OPTIONAL PARAMETERS
------------------- -------------------
match match
Allows to find a section to "replace" through one of its parameters. Allows to find a section to "replace" through one of its parameters.
The value to this parameter is a ``<option>=<string>`` string. The value to this parameter is a ``<option>=<value>`` string.
option option
An option that should be present in the section. An option that should be present in the section.
This parameter can be used multiple times to specify multiple options. This parameter can be used multiple times to specify multiple options.
The value to this parameter is a ``<option>=<string>`` string. The value to this parameter is a ``<option>=<value>`` string.
Lists can be expressed by repeatedly using the same key. Lists can be expressed by repeatedly using the same key.
state state
`present` or `absent`, defaults to `present`. ``present`` or ``absent``, defaults to ``present``.
transaction transaction
The name of the transaction this option belongs to. The name of the transaction this option belongs to.
The value will be forwarded to `cdist-type__uci`\ (7). The value will be forwarded to :strong:`cdist-type__uci`\ (7).
type type
The type of the section in the format: ``<config>.<section-type>`` The type of the section in the format: ``<config>.<section-type>``
@ -54,13 +56,36 @@ EXAMPLES
.. code-block:: sh .. code-block:: sh
# TODO # Configure the dropbear daemon
__uci_section ... __uci_section dropbear --type dropbear.dropbear --transaction sshd \
--match Port=22 --option Port=22 \
--option PasswordAuth=off \
--option RootPasswordAuth=off
# Block SSH access from the guest network
__uci_section firewall.block_ssh_from_guest --type firewall.rule \
--transaction fwrules \
--option name='Block-SSH-Access-from-Guest' \
--option src='guest' \
--option proto='tcp' \
--option dest_port='22' \
--option target='REJECT'
# Configure a Wi-Fi access point
__uci_section wireless.default_radio0 --type wireless.wifi-iface \
--transaction wifi \
--option device='radio0' \
--option mode='ap' \
--option network='wlan' \
--option ssid='mywifi' \
--option encryption="psk2' \
--option key='hunter2'
SEE ALSO SEE ALSO
-------- --------
:strong:`cdist-type__uci`\ (7) - https://openwrt.org/docs/guide-user/base-system/uci
- :strong:`cdist-type__uci`\ (7)
AUTHORS AUTHORS