informatique:os:openwrt
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
informatique:os:openwrt [2022/11/11 09:29] – pteu | informatique:os:openwrt [2022/11/11 10:02] – [UCI] pteu | ||
---|---|---|---|
Line 40: | Line 40: | ||
**UCI** (Unified Configuration Interface) est la commande qui permet d' | **UCI** (Unified Configuration Interface) est la commande qui permet d' | ||
+ | |||
+ | On peut afficher la configuration sous plusieurs formats : | ||
<code bash> | <code bash> | ||
- | uci show | + | # format natif, programmable |
- | uci set | + | uci show system |
- | uci get | + | system.@system[0]=system |
- | ! | + | system.@system[0].cronloglevel=' |
- | uci changes | + | system.@system[0].zonename=' |
+ | system.@system[0].timezone=' | ||
+ | system.@system[0].hostname=' | ||
+ | |||
+ | # paramètre précis | ||
+ | uci get system.@system[0].zonename | ||
+ | Europe/ | ||
+ | |||
+ | # format lisible (human-readable) | ||
+ | uci export system | ||
+ | config system | ||
+ | option cronloglevel ' | ||
+ | option zonename ' | ||
+ | option timezone ' | ||
+ | option hostname ' | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | Exemple de création d'une nouvelle section : | ||
+ | <code bash> | ||
+ | uci show sectionperso | ||
+ | uci import sectionperso < /dev/null | ||
+ | uci set sectionperso.myname=masectionperso | ||
+ | uci add sectionperso blah | ||
uci commit | uci commit | ||
- | ! | + | uci show sectionperso |
- | uci import | + | sectionperso.@blah[0]=blah |
- | uci export | + | </ |
+ | |||
+ | =====UCI extras===== | ||
+ | |||
+ | Pour éviter les erreurs de configuration, | ||
+ | <code bash> | ||
+ | opkg update | ||
+ | opkg install diffutils | ||
+ | uclient-fetch -O uci-extras.sh " | ||
+ | . ./ | ||
+ | </ | ||
+ | |||
+ | Cela permet d' | ||
+ | |||
+ | <code bash> | ||
+ | uci validate | ||
+ | uci diff dhcp | ||
</ | </ | ||
+ | |||
+ | =====Liens utiles===== | ||
+ | |||
+ | * https:// |
informatique/os/openwrt.txt · Last modified: 2023/02/08 10:35 by pteu