Community discussions

 
User avatar
doneware
Trainer
Trainer
Topic Author
Posts: 513
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

/system default-configuration

Thu Jul 12, 2018 7:48 pm

can we get read/write access to this thing from routeros?

right now it is not even read-only, since if i update it, it still shows the "default routeros" script.
#TR0359
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5931
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: /system default-configuration

Thu Jul 12, 2018 7:51 pm

It will not be configurable from RouterOS, in the future we might show configuration applied by netinstall there, but at the moment it will always show factory default configuration.
 
User avatar
doneware
Trainer
Trainer
Topic Author
Posts: 513
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: /system default-configuration

Thu Jul 12, 2018 10:08 pm

It will not be configurable from RouterOS
Hi Mrz,
is there any logical explanation to that?
in the future we might show configuration applied by netinstall there, but at the moment it will always show factory default configuration.
look, if you are into some advanced router configuration in some automated way, you will need a useable default configuration that enables your device to recover its state after your customer resets it. and no, TR069 is not this level - i need all the functionalities routeros can provide, scripts, access to all objects, etc. so i have to roll my own scripts, cause i want the routers to talk to me, and not access them remotely - kind of the IoT way.
But right now it is not even possible to debug the defconf script, you can't see anything unless you log every single statement you execute.
to be honest, it is almost unpredictable to me, whether my script - that otherwise runs fine if i simply import it - gets properly executed. multiple times i experienced situations, where script execution just stopped. would it be possible to re-trigger the "defconf" script automatically if it did not finish successfully?
at lest a tiny little error message could be logged to the logs, where and why it stopped.

kind of similar to the "safe mode": set at the start of the script, execute all commands, and the last command would commit safe mode, thus keep the configuration. but whenever it exists prematurely, it rolls back the so far executed lines, and retries the script. maybe you could even limit how many times the defconf script could be run before reverting to empty (real empty) configuration.

but the first step is really to see what is in there.
#TR0359
 
User avatar
Steveocee
Forum Guru
Forum Guru
Posts: 1108
Joined: Tue Jul 21, 2015 10:09 pm
Location: UK
Contact:

Re: /system default-configuration

Wed Jul 18, 2018 2:18 am

I thought you could configure the default script using flashfig? Or is that not what you meant?
Steve "Steveocee" Carter
PC Gamer, Airsofter, MikroTik Nerd
My Website - My MikroTik Tutorials
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24186
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: /system default-configuration

Wed Jul 18, 2018 7:38 am

You can use Netinstall, Branding or Flashfig to change the config that loads upon reset, yes.
No answer to your question? How to write posts
 
kai
just joined
Posts: 9
Joined: Thu Aug 24, 2017 1:15 pm

Re: /system default-configuration

Mon Oct 15, 2018 12:08 pm

You can use Netinstall, Branding or Flashfig to change the config that loads upon reset, yes.
Is that really the case? I have used NetInstall to install a customised script and it successfully sets the device. However, if I initiate a user reset (hold the reset button until the USR LED flashes and let go), it will default the device completely and not go back toe the script I set in NetInstall.

Am I missing a setting or feature to enable this?

I am using NetInstall latest version, v6.43.2 and latest RouterOS v6.43.2 also.

Edit: Solution found: needed to add a delay at the beginning of the script to allow for interfaces to come up.

Who is online

Users browsing this forum: No registered users and 11 guests