I'm trying to improve our deployment process for new-in-box routers and decided to go the netinstall route.
I wrote a custom setup script which starts like this:
Code: Select all
/system/identity/set name=****************
/user/set [ find name=admin ] password="*****************************"
/system/note/set show-at-login=no
/interface/list/add name=WAN
/interface/list/add name=LAN
My netinstall command is the following:
Code: Select all
./netinstall-cli -v -s reset-conf-out.rsc -i eth0 routeros-7.16-arm64.npk wifi-qcom-7.16-arm64.npk container-7.16-arm64.npk
But after reboot the configuration is applied but fails almost immediately with:
Code: Select all
system,error,critical error while running autorun.scr script: failure: already have interface list with such name
I was under the impression that if I specified a custom script, the default configuration wouldn't get applied, apparently I was wrong and both get applied.
Our install script is meant to run on an empty configuration.
Is there any way to skip the default configuration or to clear it in the setup script? (Using /system/reset-configuration would just boot-loop)
The best I can come up with is either:
- Run netinstall-cli twice, once with -e and once with -s
- Manually clear everything with the risk of missing something if the default config ever changes
I am aware that using /system/reset-configuration run-after-reset=myscript.rsc is a possibility, but that implies more steps just to get to a terminal
I am also aware of branding, but I can't get it to apply the default configuration
Thanks