cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
14687
Views
4
Helpful
17
Replies

Execute TCL Script On Router Startup

KyleArnold
Level 1
Level 1

I am using one of the latest 5000 series embedded routers and trying to get my TCL script to execute on Router startup, with little success.

It's the first time for me, tho i've been through the relevent Cisco documents,  the official book on TCL scripting as well as many examples found online.

Obviously I am missing something somewhere and it has me stumped. I thought it would be a simple task.

Can anyone provide a step by step instruction/requirements to get a TCL script to execute on a Cisco router everytime it boots?

17 Replies 17

KyleArnold
Level 1
Level 1

Success!!!

Thank you all so very much.

The winning combination is as below.

TCL script test.tcl placed in Flash memory.

# test.tcl

::cisco::eem::event_register_timer cron cron_entry @reboot
puts "Test complete"

and EEM

event manager directory user policy flash:

event manager policy test.tcl authorization bypass

After the IOS booted up, this appeared ... %HA_EM-6-LOG: test.tcl: Test complete

This is awesome and am very appreciative of the time you guys have given to help.

And the boss now has a smile on his face, priceless.

Cheers,

Kyle.

Jeffrey Simon
Level 1
Level 1

Just to add one more point to this.

You should be aware that there are authorization problems with EM activated TCL and TACACS.

When I coded my TCL script I had to work around this. But prior to working around this I discovered that "authorization bypass" does not apply to TCL.

I had to create a TACAS account and local user account from the script.

Jeff

Sent from Cisco Technical Support iPhone App

Yes, I can see what your saying.

I may need to address this with the current .tcl app I am developing.

Thanks Jeffrey.