Community discussions

MikroTik App
 
bp0
newbie
Topic Author
Posts: 31
Joined: Thu May 06, 2021 5:06 pm

How to remove /system/default-configuration/custom-script?

Sun Mar 19, 2023 5:29 pm

I used netinstall-cli with -s userscript to send a configuration to a rb4011 along with the firmware. I did not expect that it would save that script in /system/default-configuration/custom-script, and will always use it when the reset button is used, which is actually a nice feature. However, it seems that it also uses it when /system/reset-configuration is used and I don't see a way to get back to defconf. I even tried netinstall-cli with no -s and it still used the saved config as default config.
How can I remove the saved custom-script?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3253
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: How to remove /system/default-configuration/custom-script?  [SOLVED]

Sun Mar 19, 2023 6:00 pm

Hmm, I'm not sure the Linux version has the exact same "Apply default configuration" option like the GUI... That's how you revert this typically.

Did you try a "-r" without the "-s"? The help is a little confusing what should happen, but sounds like it should remove your configuration.

-r
When the reinstallation process is performed, the configuration is reset, and for devices that have it, the default configuration may be applied, which is optional.
 
bp0
newbie
Topic Author
Posts: 31
Joined: Thu May 06, 2021 5:06 pm

Re: How to remove /system/default-configuration/custom-script?

Sun Mar 19, 2023 6:11 pm

-r was the answer, thanks. It would be nice if it could be done without netinstall, though.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3253
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: How to remove /system/default-configuration/custom-script?

Sun Mar 19, 2023 6:22 pm

-r was the answer, thanks. It would be nice if it could be done without netinstall, though.
Fair enough. But you started with netinstall ;).
/system/reset-configuration no-defaults=yes keep-users=yes run-after-reset=customscript.rsc 
does NOT cause it to be saved...

Who is online

Users browsing this forum: norepto, svh79 and 74 guests