mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added article about UCI to the KB
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
uci show
|
||||
uci show 'dhcp'
|
||||
|
||||
# Show what interface is the WAN.
|
||||
uci show network.wan.device | cut -d "'" -f 2
|
||||
|
||||
# Configure a static IP address lease.
|
||||
uci add dhcp host
|
||||
uci set dhcp.@host[-1].name='hostname'
|
||||
@@ -197,6 +200,7 @@ Most compatible upgrades are available on [Discomp].
|
||||
|
||||
- [Led settings][wiki led settings] on the [wiki][turris wiki]
|
||||
- [opkg]
|
||||
- [uci]
|
||||
- [Supported SFP modules]
|
||||
|
||||
## Sources
|
||||
@@ -217,6 +221,7 @@ Most compatible upgrades are available on [Discomp].
|
||||
|
||||
<!-- internal references -->
|
||||
[opkg]: opkg.md
|
||||
[uci]: uci.md
|
||||
|
||||
<!-- external references -->
|
||||
[discomp]: https://www.discomp.cz/
|
||||
|
||||
40
knowledge base/uci.md
Normal file
40
knowledge base/uci.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# uci
|
||||
|
||||
Command line utility for OpenWrt's UCI system.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Show settings.
|
||||
uci show
|
||||
uci show 'dhcp'
|
||||
|
||||
# Show what interface is the WAN.
|
||||
uci show network.wan.device | cut -d "'" -f 2
|
||||
|
||||
# Configure a static IP address lease.
|
||||
uci add dhcp host
|
||||
uci set dhcp.@host[-1].name='hostname'
|
||||
uci set dhcp.@host[-1].mac='11:22:33:44:55:66'
|
||||
uci set dhcp.@host[-1].ip='192.168.1.2'
|
||||
|
||||
# Show changes to the settings.
|
||||
uci changes
|
||||
uci changes 'dhcp'
|
||||
|
||||
# Commit changes.
|
||||
uci commit
|
||||
uci commit 'dhcp'
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [The UCI system]
|
||||
|
||||
## Sources
|
||||
|
||||
<!-- project's references -->
|
||||
[the uci system]: https://openwrt.org/docs/guide-user/base-system/uci
|
||||
|
||||
<!-- internal references -->
|
||||
<!-- external references -->
|
||||
Reference in New Issue
Block a user