[rancid] Cisco Banners

heasley heas at shrubbery.net
Wed Apr 15 00:59:11 UTC 2015


Tue, Apr 14, 2015 at 09:31:27PM +0000, Todd Heide:
> Tried a few different things, including a direct match for the expression and still errors. 
> 
> expect: does "\r\nrouter#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no
> 
> What I am seeing though, and wonder if this is why,  terminal length 0  For several lines down I am seeing ter, termin, terminal, etc. until the last line above then is gives up.   I dont know why terminal length 0 is coming up at the prompt, but when I turn debug off I am seeing it every time I clogin to this router.  If this was the only router that has a MOTD, I would push to have it removed, but they want it on all devices. 
> 
>  

where did that regex come from?  "########### etc etc"

you may also try anchoring it:

{^\[^ #]+\[#>]+}

the last regex in the login procedure should eat the o/p one line at a
time, so it can be anchored.


More information about the Rancid-discuss mailing list