Community discussions

MikroTik App
 
dfxer
just joined
Topic Author
Posts: 8
Joined: Mon Jul 17, 2017 7:53 pm

reset-configuration with run-after-reset not working

Mon Jul 17, 2017 8:21 pm

Hi!

Version 6.39.2. RouterBOARD 750G r3.Trying:

/system reset-configuration keep-users=yes no-defaults=yes skip-backup=yes run-after-reset=flash/my_export_7.rsc

The configuration remains empty after this.

The file flash/my_export_7.rsc was produced by /export file=flash/my_export_7. When I use /import flash/my_export_7.rsc
configuration is restored normally.

Were is the problem?

BTW. After upgrading to 6.39.2 from factory 6.36.1 I've got the warning in config:
# Warning: memory not running at default frequency
set memory-frequency=1200DDR

/system routerboard settings set memory-frequency=? shows me "MemoryFrequency ::= 800DDR | 1066DDR | 1200DDR".
What is the default value from these ones?

Thank you in advance.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: reset-configuration with run-after-reset not working

Mon Jul 17, 2017 9:11 pm

The reload of configuration is some unconfirmed bug, I encountered it as well and I have reported it but AFAIK nothing has been done about it yet.

Just ignore the frequency warning, it is a known bug as well. It appears to be very hard to compile a correct table of default frequencies for all models...
(so some models issue this incorrect warning)
 
dfxer
just joined
Topic Author
Posts: 8
Joined: Mon Jul 17, 2017 7:53 pm

Re: reset-configuration with run-after-reset not working

Tue Jul 18, 2017 4:02 pm

pe1chl, thank you for the answer.

I've added ':delay 15s' at the top of rsc file and all works fine now.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: reset-configuration with run-after-reset not working

Tue Jul 18, 2017 4:09 pm

Ah that is interesting, maybe it would solve the issue in my case as well. (was on a RB951G)
It is hard to debug these things because there is no logfile. When I reported the issue it was promised that they would
look into:
- writing a log of errors encountered during the import
- continuing the import as long as no disastrous errors occur
As it is now, whenever a minor problem occurs during the import the processing stops right there and you have an incomplete
config that may render the router inaccessible to see what happened. (especially on the low-end models without RS232 port)
 
joyfullservice
just joined
Posts: 3
Joined: Tue Feb 28, 2017 9:24 pm

Re: reset-configuration with run-after-reset not working

Thu Sep 07, 2017 7:20 pm

@dfxer - Thanks for the tip on the delay in the config file! I have added this to my config file and it was able to import without a problem. You saved me a lot of time troubleshooting this issue, so thanks again for taking time to post how to work around it!

- Adam
 
DanielT
just joined
Posts: 15
Joined: Wed Dec 13, 2017 6:55 pm

Re: reset-configuration with run-after-reset not working

Thu Oct 04, 2018 5:02 pm

+1 Thx
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: reset-configuration with run-after-reset not working

Thu Oct 04, 2018 8:46 pm

I think it is very unfortunate that:
1. the delay is still necessary. It would seem so trivial to include it in the first-boot procedure but it has not been done even after more than a year...
2. still nothing is done about the error recovery and logging. that would likely be more work.
 
janisbvp
Frequent Visitor
Frequent Visitor
Posts: 76
Joined: Thu Jul 15, 2010 10:33 am

Re: reset-configuration with run-after-reset not working

Tue Nov 12, 2019 3:43 pm

Found this thread after same problem and guess what - the problem has not been fixed!
Years go by...
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: reset-configuration with run-after-reset not working

Tue Nov 12, 2019 4:57 pm

But now we have v7 beta so it certainly should be solved there! (all problems will be solved in v7)
 
simtini
just joined
Posts: 1
Joined: Sun Jan 12, 2020 12:59 am

Re: reset-configuration with run-after-reset not working

Sun Jan 12, 2020 1:03 am

Starting from ReuterOS 6.46.1, the run-after-reset script is not executed at all!
Can someone help?
Thanks
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: reset-configuration with run-after-reset not working

Sun Jan 12, 2020 8:42 pm

Starting from ReuterOS 6.46.1, the run-after-reset script is not executed at all!
Can someone help?
Thanks
Please read the above reply by dxfer to obtain your help.
 
elmorekevin
just joined
Posts: 3
Joined: Thu Jun 02, 2016 11:23 pm

Re: reset-configuration with run-after-reset not working

Thu Apr 30, 2020 11:26 pm

run-after-reset seems to be working for me on 6.47b60. I am using "/delay delay-time=15s" at the top of my script. I found it helpful to issue the command "import file-name=[your file]" to test to functionality of the script prior to issuing the reboot command, there were some errors that were preventing the script from running properly (and with no logging at that stage you can't diagnose it).
 
2jarek
Member Candidate
Member Candidate
Posts: 153
Joined: Thu May 17, 2007 3:28 pm
Location: Poland

Re: reset-configuration with run-after-reset not working

Mon May 18, 2020 8:38 am

run-after-reset seems to be working for me on 6.47b60. I am using "/delay delay-time=15s" at the top of my script. I found it helpful to issue the command "import file-name=[your file]" to test to functionality of the script prior to issuing the reboot command, there were some errors that were preventing the script from running properly (and with no logging at that stage you can't diagnose it).
Thank you very much "/delay delay-time=15s" is the key.
 
dke
newbie
Posts: 47
Joined: Tue Dec 10, 2019 11:30 pm
Location: Austria

Re: reset-configuration with run-after-reset not working

Thu Jun 04, 2020 3:15 pm

It is important to note that for certain devices, the configuration has to be placed inside the flash\ folder.
Warning: If the device has a folder named "flash", then the confscript.rsc file must be stored in that folder to work with "run-after-reset" command. Everything outside this folder is stored on the RAM drive which contents are deleted on reboot or power cycle.
 
kaamil1984
just joined
Posts: 8
Joined: Wed Aug 25, 2021 8:47 pm

Re: reset-configuration with run-after-reset not working

Thu Mar 03, 2022 11:01 pm

But now we have v7 beta so it certainly should be solved there! (all problems will be solved in v7)
And there will be made new problems! :)
 
EliRibble
just joined
Posts: 2
Joined: Fri Sep 13, 2024 6:11 pm

Re: reset-configuration with run-after-reset not working

Fri Sep 13, 2024 6:14 pm

If someone else comes along and finds this topic as I did you may find it useful to reference my code repository which contains a baseline configuration that can be applied with `run-after-reset` to get a working router.
Last edited by EliRibble on Fri Sep 13, 2024 6:20 pm, edited 1 time in total.