I want to modify the firstboot configuration, so that when I factory reset my device, my configuration prevails. Now, after some reading, it feels like uci-defaults is the way to go, however I got a bit confused as to how I may implemment this.
I have a script that turns my device into a dumb-ap, and this is what I want my firstboot config to be. The script is as follows:
uci set dhcp.lan.ignore='1'
uci commit dhcp
uci del firewall.cfg02dc81.network
uci add_list firewall.cfg02dc81.network='lan'
uci del firewall.cfg03dc81.network
uci add_list firewall.cfg03dc81.network='wan6'
uci commit firewall
uci del network.wan
uci add_list network.cfg030f15.ports='eth0'
uci del network.lan.ipaddr
uci del network.lan.netmask
uci set network.lan.proto='dhcp'
uci commit network
My first question is, where do I place this script in order for it to be ran after every firstboot? is it in /rom/etc/uci-defaults? or /etc/uci-defaults?
The name of the file needs to be 99_whatever_i_want.sh right?
Am I missing anything else in order to obtain my desired result?