Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:guide-developer:uci-defaults [2022/01/07 23:31] – sorcun | docs:guide-developer:uci-defaults [2023/10/14 09:08] (current) – [UCI defaults] vgaetera | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| To set some system defaults the first time the device boots, create a script in the directory ''/ | To set some system defaults the first time the device boots, create a script in the directory ''/ | ||
| - | All scripts in that directory are automatically executed by '' | + | All scripts in that directory are automatically executed by the '' |
| * If they exit with code 0 they are deleted afterwards. | * If they exit with code 0 they are deleted afterwards. | ||
| * Scripts that exit with non-zero exit code are not deleted and will be re-executed at the next boot until they also successfully exit. | * Scripts that exit with non-zero exit code are not deleted and will be re-executed at the next boot until they also successfully exit. | ||
| Line 32: | Line 32: | ||
| uci -q batch << EOI | uci -q batch << EOI | ||
| set network.lan.ipaddr=' | set network.lan.ipaddr=' | ||
| - | commit network | ||
| set wireless.@wifi-device[0].disabled=' | set wireless.@wifi-device[0].disabled=' | ||
| set wireless.@wifi-iface[0].ssid=' | set wireless.@wifi-iface[0].ssid=' | ||
| - | commit wireless | ||
| add dhcp host | add dhcp host | ||
| set dhcp.@host[-1].name=' | set dhcp.@host[-1].name=' | ||
| set dhcp.@host[-1].ip=' | set dhcp.@host[-1].ip=' | ||
| set dhcp.@host[-1].mac=' | set dhcp.@host[-1].mac=' | ||
| - | commit dhcp | ||
| rename firewall.@zone[0]=' | rename firewall.@zone[0]=' | ||
| rename firewall.@zone[1]=' | rename firewall.@zone[1]=' | ||
| rename firewall.@forwarding[0]=' | rename firewall.@forwarding[0]=' | ||
| - | commit firewall | ||
| EOI | EOI | ||
| EOF | EOF | ||
| Line 64: | Line 60: | ||
| ===== Examples ===== | ===== Examples ===== | ||
| + | * [[docs: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | |||