cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Cisco Community Designated VIP Class of 2020

163
Views
0
Helpful
3
Replies
Rising star

Running Tcl Script Before Router Reads startup-config

Hi,

Is it possible to execute a script on a router that could run before router starts to read startup-config.  

Thanks.

3 REPLIES 3
VIP Mentor

Re: Running Tcl Script Before Router Reads startup-config

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 ?

Rising star

Re: Running Tcl Script Before Router Reads startup-config

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.

Highlighted
VIP Mentor

Re: Running Tcl Script Before Router Reads startup-config

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:

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here