cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
684
Views
0
Helpful
3
Replies

Running Tcl Script Before Router Reads startup-config

rais
Level 7
Level 7

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

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 ?

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.

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:

Review Cisco Networking products for a $25 gift card