forked from ungleich-public/cdist
[type/__uci*] Update man pages
This commit is contained in:
parent
c37253b852
commit
fe26c119b5
3 changed files with 52 additions and 26 deletions
|
@ -3,23 +3,22 @@ cdist-type__uci(7)
|
|||
|
||||
NAME
|
||||
----
|
||||
cdist-type__uci - Manage configuration values in OpenWrt's
|
||||
Unified Configuration Interface (UCI)
|
||||
cdist-type__uci - Manage configuration values in UCI
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This cdist type can be used to alter configuration options in OpenWrt's UCI
|
||||
system.
|
||||
This cdist type can be used to alter configuration options in OpenWrt's
|
||||
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
|
||||
-------------------
|
||||
value
|
||||
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
|
||||
characters.
|
||||
|
@ -28,10 +27,10 @@ value
|
|||
OPTIONAL PARAMETERS
|
||||
-------------------
|
||||
state
|
||||
`present` or `absent`, defaults to `present`.
|
||||
``present`` or ``absent``, defaults to ``present``.
|
||||
transaction
|
||||
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
|
||||
|
|
|
@ -3,14 +3,16 @@ cdist-type__uci_commit(7)
|
|||
|
||||
NAME
|
||||
----
|
||||
cdist-type__uci_commit - Commit a UCI transaction.
|
||||
cdist-type__uci_commit - Commit UCI transactions
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This type executes the "uci commit" command on the target.
|
||||
It is usually not required to use this type. Use the `--transaction` parameter
|
||||
of `cdist-type__uci`\ (7) instead.
|
||||
This type executes the ``uci commit`` command on the target with the commands
|
||||
queued in a transaction.
|
||||
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
|
||||
|
@ -42,7 +44,7 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
:strong:`cdist-type__uci`\ (7)
|
||||
:strong:`cdist-type__uci`\ (7), :strong:`cdist-type__uci_section`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
|
|
|
@ -3,21 +3,23 @@ cdist-type__uci_section(7)
|
|||
|
||||
NAME
|
||||
----
|
||||
cdist-type__uci_section - Manage configuration sections in OpenWrt's
|
||||
Unified Configuration Interface (UCI)
|
||||
cdist-type__uci_section - Manage configuration sections in UCI
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This cdist type can be used to replace whole configuration sections in OpenWrt's
|
||||
UCI system.
|
||||
It can be thought of as syntactic sugar for `cdist-type__uci`\ (7), as this type
|
||||
will generate the required `__uci` objects to make the section contain exactly
|
||||
the options specified via ``--option``.
|
||||
Unified Configuration Interface (UCI) system.
|
||||
It can be thought of as syntactic sugar for :strong:`cdist-type__uci`\ (7),
|
||||
as this type will generate the required `__uci` objects to make the section
|
||||
contain exactly the options specified using ``--option``.
|
||||
|
||||
Since many default UCI sections are unnamed, this type allows to find the
|
||||
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
|
||||
-------------------
|
||||
|
@ -28,18 +30,18 @@ OPTIONAL PARAMETERS
|
|||
-------------------
|
||||
match
|
||||
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
|
||||
An option that should be present in the section.
|
||||
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.
|
||||
state
|
||||
`present` or `absent`, defaults to `present`.
|
||||
``present`` or ``absent``, defaults to ``present``.
|
||||
transaction
|
||||
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
|
||||
The type of the section in the format: ``<config>.<section-type>``
|
||||
|
||||
|
@ -54,13 +56,36 @@ EXAMPLES
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
# TODO
|
||||
__uci_section ...
|
||||
# Configure the dropbear daemon
|
||||
__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
|
||||
--------
|
||||
:strong:`cdist-type__uci`\ (7)
|
||||
- https://openwrt.org/docs/guide-user/base-system/uci
|
||||
- :strong:`cdist-type__uci`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
|
|
Loading…
Reference in a new issue