This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
documentation:configuration:uci [2015/05/12 16:15] admin [File Syntax / Basic principle] |
documentation:configuration:uci [2018/05/24 09:05] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
The //__U__nified __C__onfig __S__ystem// is the central pivot when it comes the routers configuration settings. | The //__U__nified __C__onfig __S__ystem// is the central pivot when it comes the routers configuration settings. | ||
- | All maintained configuration files are stored in ///etc/config/// and can either be edited with an usual text-editor or by using the //uci// command-line interface. \\ | + | All maintained configuration files are stored in ///etc/config/// and can either be edited with a text-editor or by using the //uci// command-line interface. \\ |
After altering the routers configuration files, affected system services needs to be restarted. | After altering the routers configuration files, affected system services needs to be restarted. | ||
Line 16: | Line 16: | ||
Each section starts with the //'config'//-statement and can imply multiple settings. | Each section starts with the //'config'//-statement and can imply multiple settings. | ||
- | Below is an simple example of such an block: | + | Below is an simple example of such a section block: |
<code> | <code> | ||
Line 30: | Line 30: | ||
Followed by two //'option'//-statements which defines simple values. Each option needs a name and a value. | Followed by two //'option'//-statements which defines simple values. Each option needs a name and a value. | ||
- | Finally the section ends with two //'list'//-statements. Lists are special options which can combine multiple list-entries to one singe object. | + | Finally the example section ends with two //'list'//-statements. Lists are special options which can combine multiple list-entries to one singe object. |
Like //options//, each list needs a name. If several list-statements with the same name are present in one section, each entry will be added to the list. | Like //options//, each list needs a name. If several list-statements with the same name are present in one section, each entry will be added to the list. | ||
In our example, a single list named 'collection' will be generated, containing the entries 'first item' and 'second item'. | In our example, a single list named 'collection' will be generated, containing the entries 'first item' and 'second item'. | ||
Line 40: | Line 40: | ||
Usage | Usage | ||
- | root@OpenWrt:/lib/config# uci | + | # uci |
Usage: uci [<options>] <command> [<arguments>] | Usage: uci [<options>] <command> [<arguments>] | ||
Line 73: | Line 73: | ||
-X do not use extended syntax on 'show' | -X do not use extended syntax on 'show' | ||
</code> | </code> | ||
+ | |||
+ | If you want to look up your changes use the following command: | ||
+ | <code> | ||
+ | uci changes | ||
+ | </code> | ||
+ | |||
+ | In case you alter the UCI configuration using the command-line interface, the config needs to be written to the configuration files by commiting them using: | ||
+ | <code> | ||
+ | uci commit | ||
+ | </code> | ||
+ | before any service restarts will take effect of the configuration |