User Tools

Site Tools


docs:guide-user:base-system:uci

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-user:base-system:uci [2018/06/11 16:56]
tmomas link fixed
docs:guide-user:base-system:uci [2018/10/01 03:19] (current)
flywire [Usage] reorder
Line 37: Line 37:
 | [[docs:​guide-user:​base-system:​dhcp|/​etc/​config/​dhcp]] | Dnsmasq configuration and DHCP settings | | [[docs:​guide-user:​base-system:​dhcp|/​etc/​config/​dhcp]] | Dnsmasq configuration and DHCP settings |
 | [[docs:​guide-user:​base-system:​dropbear|/​etc/​config/​dropbear]] | SSH server options | | [[docs:​guide-user:​base-system:​dropbear|/​etc/​config/​dropbear]] | SSH server options |
-| [[docs:​guide-user:​firewall:​firewall_configuration|/​etc/​config/​firewall]] | NAT, packet filter, port forwarding, etc.  |+| [[docs:​guide-user:​firewall:​start|/​etc/​config/​firewall]] | NAT, packet filter, port forwarding, etc.  |
 | [[docs:​guide-user:​base-system:​basic-networking|/​etc/​config/​network]] | Switch, interface and route configuration | | [[docs:​guide-user:​base-system:​basic-networking|/​etc/​config/​network]] | Switch, interface and route configuration |
 | [[docs:​guide-user:​base-system:​system_configuration|/​etc/​config/​system]] | Misc. system settings | | [[docs:​guide-user:​base-system:​system_configuration|/​etc/​config/​system]] | Misc. system settings |
Line 69: Line 69:
 | [[docs:​guide-user:​services:​captive-portal:​nodogsplash|nodogsplash Configuration]] | nodogsplash configuration | | [[docs:​guide-user:​services:​captive-portal:​nodogsplash|nodogsplash Configuration]] | nodogsplash configuration |
 | [[docs:​guide-user:​services:​ntp:​client|/​etc/​config/​ntpclient]] | Getting the correct time | | [[docs:​guide-user:​services:​ntp:​client|/​etc/​config/​ntpclient]] | Getting the correct time |
 +| [[docs:​guide-user:​services:​ups:​software.nut|/​etc/​config/​nut_server]] | Controlling a UPS (Uninterruptible Power Supply) and/or sharing with other hosts |
 +| [[docs:​guide-user:​services:​ups:​software.nut|/​etc/​config/​nut_monitor]] | Monitoring a UPS (Uninterruptible Power Supply) from a remote host or local nut-server |
 +| [[docs:​guide-user:​services:​ups:​software.nut|/​etc/​config/​nut_cgi]] | Web UI for NUT (viewing only in UCI) |
 | [[docs:​guide-user:​services:​print_server:​p910nd|/​etc/​config/​p910nd]] | config for non-spooling Printer daemon [[docs:​guide-user:​services:​print_server:​p910nd.server]] | | [[docs:​guide-user:​services:​print_server:​p910nd|/​etc/​config/​p910nd]] | config for non-spooling Printer daemon [[docs:​guide-user:​services:​print_server:​p910nd.server]] |
 | [[docs:​guide-user:​services:​nas:​pure-ftpd|/​etc/​config/​pure-ftpd]] | Pure-FTPd server config | | [[docs:​guide-user:​services:​nas:​pure-ftpd|/​etc/​config/​pure-ftpd]] | Pure-FTPd server config |
Line 93: Line 96:
  
 The UCI configuration files usually consist of one or more ''​config''​ statements, so called sections with one or more option statements defining the actual values. The UCI configuration files usually consist of one or more ''​config''​ statements, so called sections with one or more option statements defining the actual values.
 +
 +A ''#''​ begins comments in the usual way. Specifically,​ if a line contains a ''#''​ outside of a string literal, it and all characters after it in the line are considered a comment and ignored.
  
 Below is an example of a simple configuration file (see also [[#​uci_dataobject_model]]):​ Below is an example of a simple configuration file (see also [[#​uci_dataobject_model]]):​
Line 201: Line 206:
 | ''​rename'' ​  | ''<​config>​.<​section>​[.<​option>​]=<​name>''​ | Rename the given option or section to the given name. | | ''​rename'' ​  | ''<​config>​.<​section>​[.<​option>​]=<​name>''​ | Rename the given option or section to the given name. |
 | ''​revert'' ​  | ''<​config>​[.<​section>​[.<​option>​]]''​ | Revert the given option, section or configuration file. | | ''​revert'' ​  | ''<​config>​[.<​section>​[.<​option>​]]''​ | Revert the given option, section or configuration file. |
-| ''​reorder'' ​  | ''<​config>​.<​section>​=<​position>''​ | todo |+| ''​reorder'' ​  | ''<​config>​.<​section>​=<​position>''​ | Move a section to another position. ​|
  
 ===== UCI data/​object ​ model ===== ===== UCI data/​object ​ model =====
Line 244: Line 249:
 | **Human-friendly**,​ named section ("uci export network"​) | **Human-friendly**,​ unnamed section ("uci export network"​) |  | | **Human-friendly**,​ named section ("uci export network"​) | **Human-friendly**,​ unnamed section ("uci export network"​) |  |
 | {{:​media:​doc:​howtos:​uci_hr_named.png?​nolink|}} | {{:​media:​doc:​howtos:​uci_hr_unmaned.png?​nolink|}} |  | | {{:​media:​doc:​howtos:​uci_hr_named.png?​nolink|}} | {{:​media:​doc:​howtos:​uci_hr_unmaned.png?​nolink|}} |  |
-| **Programmable**,​ named section ("uci show network.wan"​) | **Programmable**,​ unnamed section, ​anonoumys ​name ("uci show network"​) | **Programmable**,​ unnamed section, CFGID ("uci show network.@switch[0]"​) |+| **Programmable**,​ named section ("uci show network.wan"​) | **Programmable**,​ unnamed section, ​anonymous ​name ("uci show network"​) | **Programmable**,​ unnamed section, CFGID ("uci show network.@switch[0]"​) |
 | {{:​media:​doc:​howtos:​uci_prg_named.png?​nolink|}} | {{:​media:​doc:​howtos:​uci_prg_unmaned_an.png?​nolink|}} | {{:​media:​doc:​howtos:​uci_prg_unmaned_cfgid.png?​nolink|}} ​ | | {{:​media:​doc:​howtos:​uci_prg_named.png?​nolink|}} | {{:​media:​doc:​howtos:​uci_prg_unmaned_an.png?​nolink|}} | {{:​media:​doc:​howtos:​uci_prg_unmaned_cfgid.png?​nolink|}} ​ |
  
Line 521: Line 526:
 ===== Porting UCI to a different Linux distribution ===== ===== Porting UCI to a different Linux distribution =====
  See [[docs:​techref:​uci#​usage_outside_of_openwrt|UCI (Unified Configuration Interface) – Technical Reference]]  See [[docs:​techref:​uci#​usage_outside_of_openwrt|UCI (Unified Configuration Interface) – Technical Reference]]
 +
 +===== Finding faulty configs =====
 +If you have any errors on generic ''​uci''​ commands (like ''​uci commit''​) one of the files in ''/​etc/​config/''​ may be misconfigured/​broken. To find the offending file, run: 
 +<code bash>
 +for i in /​etc/​config/​*;​ do 
 +    if ! uci show ${i##*/} > /dev/null 2>&​1;​ then 
 +        echo -e -n "$i: "; uci show ${i##*/} > /​dev/​null; ​
 +    fi
 +done
 +</​code>​
 +
 +FIXME //Please add example error messages.//
docs/guide-user/base-system/uci.1528736213.txt.gz · Last modified: 2018/06/11 16:56 by tmomas