Discussion:
[rancid] Cisco ACSW support
Brian De Wolf
2011-07-07 23:25:57 UTC
Permalink
Hello,

I found a patch on this list from 2008 that added ACSW support but it
doesn't appear to have ever been merged. Further, after applying it,
rancid still didn't work. I have attached a revised patch that makes
it work again by adding a ";" to the end of the list of commands. The
problem was that, in this case, WriteTerm was eating the line that held
"$prompt exit" so rancid assumed clogin exited uncleanly. Instead,
this makes the switch print an extra prompt for WriteTerm to eat so
that rancid can see the exit line and realize that everything went as
expected.

Next, once we have a rancid run working correctly, I noticed it wasn't
hiding the tacacs passwords right. This exposed a really broken regex
in rancid:
/^((tacacs|radius)-server\s(\w*[-\s(\s\S+])*\s?key) (\d )?\w+/

I've rewritten it to be less mind-bending, and added optional quotes
around the \w+ to support the style ACSW uses.

Please consider these patches for inclusion in future versions.

Thanks!
Brian

Loading...