This is an old revision of the document!
====== UCI ====== The //__U__nified __C__onfig __S__ystem// is the central pivot when it comes the routers configuration settings. All maintained configuration files are storen in ///etc/config/// and can either be edited with an usual text-editor or by using the //uci// command-line interface. Besides the command-line tool, //uci// also offers alternative programming interfaces, which makes it comfortable to manage the system-configuration from your c-programs or shell-scripts. ===== Configuration Files ===== A List of maintained configuration files: [[documentation:configuration:config_files|Configuration Files]] ===== File Syntax ===== Usually the configuration files (//'packages'//) consists of various blocks, so called //'sections'//, which all starts with the //'config'//-statement. Each section can imply multiple options. Below is an example of a simple configuration file: <code> package 'example' config 'example' 'test' option 'string' 'some value' option 'boolean' '1' list 'collection' 'first item' list 'collection' 'second item' </code> ====== Command line utility ====== <code> Usage root@OpenWrt:/lib/config# uci Usage: uci [<options>] <command> [<arguments>] Commands: batch export [<config>] import [<config>] changes [<config>] commit [<config>] add <config> <section-type> add_list <config>.<section>.<option>=<string> show [<config>[.<section>[.<option>]]] get <config>.<section>[.<option>] set <config>.<section>[.<option>]=<value> delete <config>[.<section[.<option>]] rename <config>.<section>[.<option>]=<name> revert <config>[.<section>[.<option>]] Options: -c <path> set the search path for config files (default: /etc/config) -d <str> set the delimiter for list values in uci show -f <file> use <file> as input instead of stdin -m when importing, merge data into an existing package -n name unnamed sections on export (default) -N don't name unnamed sections -p <path> add a search path for config change files -P <path> add a search path for config change files and use as default -q quiet mode (don't print error messages) -s force strict mode (stop on parser errors, default) -S disable strict mode -X do not use extended syntax on 'show' </code>