01-13-2020 08:52 AM
Hi,
Is it possible to execute a script on a router that could run before router starts to read startup-config.
Thanks.
01-13-2020 09:55 AM
Hello,
not sure if that is possible. You can register and run a TCL script upon reboot:
::cisco::eem::event_register_timer cron cron_entry @Reboot
What exactly are you trying to accomplish ?
01-13-2020 10:09 AM
Where do I have to save this statement?
::cisco::eem::event_register_timer cron cron_entry @Reboot
Trying to configure an ethernet interface + enable ssh/telnet after 'write erase' reboot on a remote device.
Thanks.
01-13-2020 11:10 AM - edited 01-13-2020 11:54 AM
Hello,
the line is put at the top of the actual tcl script. Let's say your tcl script is called ssh_telnet.tcl. The first line would be:
::cisco::eem::event_register_timer cron cron_entry @Reboot
followed by the actual script you have configured.
On your router, you would configure the below:
event manager directory user policy flash:
event manager policy ssh_telnet.tcl authorization bypass
Edit: you need to save the tcl script to flash:
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide