Differences
This shows you the differences between two versions of the page.
|
doc:uci [2013/01/25 15:52] whuang link to techref |
doc:uci [2013/05/23 16:15] (current) nousername |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| The abbreviation [[doc:techref:uci|UCI]] stands for //**__U__**nified **__C__**onfiguration **__I__**nterface// and is intended to centralize the configuration of OpenWrt. | The abbreviation [[doc:techref:uci|UCI]] stands for //**__U__**nified **__C__**onfiguration **__I__**nterface// and is intended to centralize the configuration of OpenWrt. | ||
| - | Configuration should be easy, straight forward and documented here, making life easier! (UCI is the successor to the nvram-based configuration found in the White Russian series of OpenWrt.) | + | Configuration should be easy, straightforward and documented here, making life easier! UCI is the successor to the NVRAM-based configuration found in the White Russian series of OpenWrt. |
| - | Many programs have their own config files lying around somewhere, like ''/etc/network/interfaces'' or ''/etc/exports'' or ''/etc/dnsmasq.conf'' ''/etc/samba/samba.conf'' and they often use different syntax. With OpenWrt you don't have to bother with any of them and only need to change the UCI configuration files! | + | Many programs have their own configuration files lying around somewhere, like ''/etc/network/interfaces'', ''/etc/exports'', ''/etc/dnsmasq.conf'' or ''/etc/samba/samba.conf'' and they often use different syntaxes. With OpenWrt you don't have to bother with any of them and only need to change the UCI configuration files. |
| - | You no longer have to reboot your system to make configuration changes! You can use the [[doc:uci#command.line.utility|UCI command line utility]] instead. And please do not forget that quite some daemons are included in the official binaries, but they are not enabled by default! For example the cron daemon is not activated by default, thus only editing the crontab won't do anything. You have to either start the daemon with ''/etc/init.d/cron start'' or enable it with ''/etc/init.d/cron enable''. You can ''disable'', ''stop'' and ''restart'' most of those daemons, too. There are some [[doc:howto:notuci.config]] you may want to tend to. | + | You no longer have to reboot your system to make configuration changes. You can use the [[doc:uci#command.line.utility|UCI command line utility]] instead. And please do not forget that quite some daemons are included in the official binaries, but they are not enabled by default! For example the ''cron'' daemon is not activated by default, thus only editing the ''crontab'' won't do anything. You have to either start the daemon with ''/etc/init.d/cron start'' or enable it with ''/etc/init.d/cron enable''. You can ''disable'', ''stop'' and ''restart'' most of those daemons, too. There are some [[doc:howto:notuci.config|not UCI configuration files]] you may want to tend to. |
| ===== Common Principles ===== | ===== Common Principles ===== | ||
| Line 308: | Line 308: | ||
| === Get SSID === | === Get SSID === | ||
| <code> uci get wireless.@wifi-iface[-1].ssid</code> | <code> uci get wireless.@wifi-iface[-1].ssid</code> | ||
| + | |||
| + | ==== Defaults: ==== | ||
| + | |||
| + | To set some system defaults the first time the device boots, create a script in the folder | ||
| + | <code>/etc/uci-defaults/</code> | ||
| + | All scripts in that folder are automatically executed by ''/etc/init.d/S10boot'' and if they exited with code 0 __deleted afterwards__ (scripts that did not exit with code 0 are not deleted and will be re-executed during the next boot until they also successfully exit). | ||
| ===== Porting UCI to a different Linux distribution ===== | ===== Porting UCI to a different Linux distribution ===== | ||
| * [[https://forum.openwrt.org/viewtopic.php?id=15243]] | * [[https://forum.openwrt.org/viewtopic.php?id=15243]] | ||
doc/uci.1359125579.txt.bz2 · Last modified: 2013/01/25 15:52 by whuang
