Using clogin to push multi-line banner motd's?

Adam Rothschild asr at latency.net
Tue Feb 26 05:24:33 UTC 2002


Hi,

Forgive me for asking something whacky, bordering on outright stupid,
but this seems like the appropriate forum.

I've been using rancid's clogin as a mechanism for pushing out config
policy changes to IOS-speaking devices automagically, and I have a
feeling others are doing the same.

One small stumbling block I've come across is, I'd like to be able to
push out multi-line banner motd's, eg:

  crisco1.lab(config)#banner motd ^
  Enter TEXT message.  End with the character '^'.
  line 1 blah blah
  line 2 blah blah
  line 2 blah blah
  [...]
  ^
  crisco1.lab(config)#

So, I run 'clogin -x [command sequence] [device]'...

  spawn telnet crisco1.lab 
  [...]

  User Access Verification

  Username: rancid
  Password: 

  crisco1.lab>enable
  Password: 
  crisco1.lab#term length 
  crisco1.lab#conf t
  Enter configuration commands, one per line.  End with CNTL/Z.
  crisco1.lab(config)#no banner motd
  crisco1.lab(config)#banner motd ^ 
  Enter TEXT message.  End with the character '^'.
 
  [hangs]

Don't get me wrong, I realize this is the correct behavior, as
clogin's not seeing the prompt it's expecting.  Question is, what
work-arounds for this particular issue are there, short of sticking
with one-line banner motd's, or pushing out the config snippets by
some other means?

For bonus points, has anyone written a patch to get clogin to behave
as I want it to, by any chance?  :-)

Thanks in advance,
-adam



More information about the Rancid-discuss mailing list