Hi!
What do you think about possibility to run script after full system reset.
In such case it will be available to reset routers remotely.
Thanks!
Denis.
Hi!
What do you think about possibility to run script after full system reset.
In such case it will be available to reset routers remotely.
Thanks!
Denis.
You can do this already… using netinstall setup a configuration script. This script will run after /system reset always.
I learned this at MUM with the tournament routers : )
Sam
OK, found it.
The case is closed.
Thanks!
Denis.
Actually this does NOT solve the issue, which is a feature request I mention for (probably) years now
.
It would be VERY (VERY VERY) handy to be able to put a script file on the router that will be executed exactly once after a “system reset”. That way we could put either a “factory default” config on systems (i.e. like preconfigured wireless setup on devices sold to customers - and they could restore that factory default). Or put a minimal config on a remote system when needing to do a system reset, so that we can at least REACH the system after the system reset again (and do the rest of the config).
This can NOT be solved by netinstall, as netinstall needs a layer 2 connection to the router in question. And then you even have to make sure that the router will boot from the network after a system reset - no good way to do that on a remote system, too…
So, I will rephrase my feature request once again to MikroTik ![]()
It cannot be that hard - the mechanisms are there (scripting from files etc.) - they just have to be adapted to this case.
Best regards,
Christian Meis
what scripting are you talking about when reset removes EVERYTHING. if reset would not remove something, it would not be a reset
but i get your point
and what if your script contains a mistake? you would never be able to get back into your box, because reset would load that faulty config
Well, of course.
But I think that should be our responsibility. If you REALLY f**k up that way, you (or I
) will have to reinstall via netinstall.
But having the feature would definitely be a good thing!
Best regards,
Christian Meis
It would be VERY (VERY VERY) handy to be able to put a script file on the router that will be executed exactly once after a “system reset”. That way we could put either a “factory default” config on systems (i.e. like preconfigured wireless setup on devices sold to customers - and they could restore that factory default).
This is exactly what is there. Its a non-documented feature I believe. I learned about it from Janis who setup the tournament routers at MUM. You could perform a /system reset and wha la - the router had the initial configuration again. The configuration script is not shown in /file or anywhere else, it is only placed there using netinstall the first time. If you run a system reset then that script gets run - but does not get lost, so the next time /system reset it run it is ran again. If you want to remove it or change it reuse netinstall to replace it again.
The configuration script is hidden and cannot be seen, but runs on each /system reset. Kinda cool. Perfect for those times when you want to bring it back to factory default (your factory settings, not blank)
Sam
changeip, forget about netinstall…
Or you think that you’ll be able to use netinstall on wireless client routers after system reset? I don’t think so…
But I think that should be our responsibility. If you REALLY f**k up that way, you (or I ) will have to reinstall via netinstall.
100% agree!
Denis.
netinstall them before they leave your facility - just to get the config script on the box, then you never need it after that. Netinstall is just the only way to get the ‘hidden’ factory configuration script on the boards… once its there and leaves your site you don’t need to use it, just perform /system reset and the configuration script will run each time.
Sam
Don’t get it clearly… Step-by-step example?
Denis.
1 - create a script that you wish to use to run on the routers each time they perform /system reset:
/int eth set 0 address=10.10.10.1/24
/system ntp client set primary-ntp=1.2.3.4
/snmp enabled=yes
(The above is just an example - create your own.)
2 - Save this script as factory.txt
3 - Use netinstall to install a new router. Specify factory.txt as the configuration script.
4 - send unit to a customer or whereever.
5 - Run /system reset anytime customer screws up config - or even schedule it - or tell it to run if wlan becomes disables or something. Basically run /system reset anytime you wish to reset the config and run that factory.txt script.
You will not see that script anywhere once uploaded, its totally hidden.
Sam
Nice one, Sam.
Wouldn’t have been to hard for MikroTik to point out this feature - I (and several others) have asked for that for a long time, and always only got answers like “maybe later”… ![]()
Best regards,
Christian Meis
I have worked a lot with big L7 switches and one feature i really like is the possibility to have 2 active images in flash together with multiple configurations so you set the active image and configuration and then reboot. These are of course also selectable from the serial console. This way we could test new images with an existing config and reverse back with just a reboot if things fails.. RouterOS should be able to do the same. I mean, this is Linux.. Another good thing about this is the possibility to preconfigure a lot of systems very fast..
/Henrik
well importing text files has always been there. you asked us to make system reset to specific configuration. importing text files from console and netinstall is nothing new
normis, the problem is that documentation is a bit outdated, because since december there are a lot of new features… and they are undocumented at the moment…
Anyway, I’ve got an answer to my question and the thread can be closed now I suppose…
Thanks to all guys!
Denis.
yes, we know. and it’s a huge document, so we are constantly working on updates for it, but not all is done yet
I dont want to be rude, but “constantly”? ![]()
you wouldn’t believe …
It’s already available? ![]()