I want to be able to make modifications to the after-login banner on my 4,000 switches. I would like to use a TCL script from within Netsight to do it.
I have the entire script working except that I found that the "configure banner" command is uniquely problematic. The command needs to be issued and then the text of the banner typed out in a terminal and finished with a blank line to denote the end of the banner.
The problem within a script is that when I issue the "configure banner after-login" command, there is no response of any kind from the switch. I want to be able to send the text of the banner, and I thought I could do it with:
CLI $bannerText
but that just times out.
In other situations where further input is required the idiom is typically:
SAVE config secondary
regexp {.*overwrite it?.*} ${CLI.OUT} foundit
IF ([info exists foundit]) THEN
CLI yes
ENDIF
So you issue a command and match on the CLI.OUT contents.
In this case it seems like the script just hangs on the banner command and times out.
JUST WONDERING IF ANYBODY HAS FOUND A WAY AROUND THIS.
I have a TCL script outside of Netsight that can do this but it's much better to allow all my colleagues to run the script from inside our management system.