Use uci-defaults. Put a UCI batch in your build-system at files/etc/uci-defaults/defaults, make it executable and rebuild the image. Don't forget to make the script executable (chmod a+x files/etc/uci-defaults/defaults).
Example uci-defaults scriptn (files/etc/uci-defaults/defaults):
#!/bin/sh
uci batch <<-EOF
# Set the default LuCI WebUI theme to openwrt-light
set luci.main.mediaurlbase=/luci-static/openwrt-light
commit luci
# Set the correct timezone for Europe/Berlin
set system.@system[0].timezone=MEST-2
commit system
# Change the default NTP servers to some local ones
set ntpclient.@ntpserver[0].hostname=ptbtime1.ptb.de
set ntpclient.@ntpserver[1].hostname=ptbtime2.ptb.de
set ntpclient.@ntpserver[2].hostname=de.pool.ntp.org
set ntpclient.@ntpserver[3].hostname=europe.pool.ntp.org
commit ntpclient
# Set a static leases
add luci_ethers static_lease
set luci_ethers.@static_lease[-1].macaddr='00:0c:29:f0:a5:5e'
set luci_ethers.@static_lease[-1].ipaddr='192.168.1.222'
commit luci_ethers
# Set a different IP address for LAN
set network.lan.ipaddr=192.168.0.1
commit network
EOF
With some scripting this should work. The uci-defaults scripts will run once on the first boot after flashing.
(Last edited by Yanira on 20 Oct 2008, 12:48)