Hi,
we will have to configure about 800 to 1200 routers, all of them with a slightly different configuration. Instead of configuring all of them via the Web GUI I download things like openvpn certificates, SIM PIN etc. from a database and create different configuration files with a python script. After creating the configuration I transfer the single files automatically via SCP and reboot the router. To configure them automatically I adjust and transfer the following files:
- /etc/config/firewall
- /etc/config/network
- /etc/config/ntpclient
- /etc/config/openvpn
- /etc/config/ping_reboot
- /etc/config/rms_connect
- /etc/crontabs/root
- /etc/shadow
- /etc/config/simcard
- /etc/config/teltonika
My problem lies within the 'etc/config/network' file. I generate the following wan2 config
config interface 'wan2'
option ifname 'eth1'
option proto 'dhcp'
option enabled '0'
option disabled '1'
After the transfer and automatic reboot I realized that the wan2 configuration within the 'etc/config/network' was changed to
config interface 'wan2'
option enabled '0'
option disabled '1'
option ifname 'wwan0'
option proto 'none'
this results in having two Mobile WANs beeing displayed on the Web GUI. If I change the file on the router again and reboot everything looks fine (WAN1 = Mobile, WAN2 = Wired, WAN3 = Wifi).
Is there some script I don't know about that is executed after the first boot that is changing the network configuration?
Or is it recless anyway to manually change the configuration like this? Is there a cleaner way to autoconfigurate the routers without using the Web GUI for all the routers we have.
Regards Ian