1CDIST-TYPE__UCI_SECTION(7)           cdist          CDIST-TYPE__UCI_SECTION(7)
2
3
4

NAME

6       cdist-type__uci_section - Manage configuration sections in UCI
7

DESCRIPTION

9       This  cdist type can be used to replace whole configuration sections in
10       OpenWrt's Unified Configuration Interface  (UCI)  system.   It  can  be
11       thought of as syntactic sugar for cdist-type__uci(7), as this type will
12       generate the required __uci objects to make the section contain exactly
13       the options specified using --option.
14
15       Since  many  default UCI sections are unnamed, this type allows to find
16       the matching section by one of its options using the --match parameter.
17
18       NOTE: Options already present on the target and not listed in  --option
19       or --list will be deleted.
20

REQUIRED PARAMETERS

22       None.
23

OPTIONAL PARAMETERS

25       list   An  option  that  is part of a list and should be present in the
26              section (as part of a list).  Lists with multiple options can be
27              expressed by using the same <option> repeatedly.
28
29              The value to this parameter is a <option>=<value> string.
30
31              <value>  does  not  need  special quoting for UCI.  The only re‐
32              quirement is that the value is passed to the type  as  a  single
33              shell argument.
34
35       match  Allows to find a section to "replace" through one of its parame‐
36              ters.
37
38              The value to this parameter is a <option>=<value> string.
39
40       option An option that should be present in the section.  This parameter
41              can be used multiple times to specify multiple options.
42
43              The value to this parameter is a <option>=<value> string.
44
45              <value>  does  not  need  special quoting for UCI.  The only re‐
46              quirement is that the value is passed to the type  as  a  single
47              shell argument.
48
49       state  present or absent, defaults to present.
50
51       type   The type of the section in the format: <config>.<section-type>
52

BOOLEAN PARAMETERS

54       None.
55

EXAMPLES

57          # Configure the dropbear daemon
58          __uci_section dropbear --type dropbear.dropbear \
59              --match Port=22 --option Port=22 \
60              --option PasswordAuth=off \
61              --option RootPasswordAuth=off
62
63          # Define a firewall zone comprised of lan and wlan networks
64          __uci_section firewall.internal --type firewall.zone \
65              --option name='internal' \
66              --list network='lan' \
67              --list network='wlan' \
68              --option input='ACCEPT' \
69              --option output='ACCEPT' \
70              --option forward='ACCEPT'
71
72          # Block SSH access from the guest network
73          __uci_section firewall.block_ssh_from_guest --type firewall.rule \
74              --option name='Block-SSH-Access-from-Guest' \
75              --option src='guest' \
76              --option proto='tcp' \
77              --option dest_port='22' \
78              --option target='REJECT'
79
80          # Configure a Wi-Fi access point
81          __uci_section wireless.default_radio0 --type wireless.wifi-iface \
82              --option device='radio0' \
83              --option mode='ap' \
84              --option network='wlan' \
85              --option ssid='mywifi' \
86              --option encryption="psk2' \
87              --option key='hunter2'
88

SEE ALSO

90https://openwrt.org/docs/guide-user/base-system/uci
91
92cdist-type__uci(7)
93

AUTHORS

95       Dennis Camera <dennis.camera@ssrq-sds-fds.ch>
96

COPYING

98       Copyright (C) 2020 Dennis Camera. You can redistribute it and/or modify
99       it under the terms of the GNU General Public License  as  published  by
100       the  Free  Software Foundation, either version 3 of the License, or (at
101       your option) any later version.
102
104       ungleich GmbH 2020
105
106
107
108
1096.9.6                            Apr 20, 2021       CDIST-TYPE__UCI_SECTION(7)
Impressum