[rancid] adding a "new" type for axos
Jon Lewis
jlewis at lewis.org
Mon Dec 11 04:18:53 UTC 2023
On Sat, 9 Dec 2023, Jon Lewis wrote:
> --- ios.pm.orig 2020-10-15 11:26:17.000000000 -0400
> +++ ios.pm 2023-12-09 22:21:50.408683973 -0500
> @@ -2787,7 +2794,7 @@
> # The ContentEngine lacks a definitive "end of config" marker. If we
> # know that it is a CE, SAN, or NXOS and we have seen at least 5 lines
> # of write term output, we can be reasonably sure that we have the
> # config.
> - if (($type eq "CE" || $type eq "SAN" || $type eq "NXOS") && $linecnt > 5) {
> + if (($type eq "CE" || $type eq "SAN" || $type eq "NXOS" || $devtype eq "axos") && $linecnt > 5) {
> $found_end = 1;
> return(0);
> }
I did some more debugging tonight, and see the problem now. I'm kind of
curious out the CE/SAN/NXOS types get around this...but the problem is,
with no clear end of config marker to the show running-config, the
WriteTerm function doesn't stop processing input until it's read all of
it. In WriteTerm, when
last if (/^$prompt/);
matches, the line matched has the exit command on it. So when
processing is handed back to inloop, there's nothing left for it to
process other than the "Shared connection to ... closed." message from
ssh.
Would it be an appropriate workaround for this to also set $clean_run = 1
in the above if statement at the end of WriteTerm...or make a new if
statment just for $devtype axos that sets both $found_end and $clean_run?
----------------------------------------------------------------------
Jon Lewis, MCP :) | I route
Blue Stream Fiber, Sr. Neteng | therefore you are
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
More information about the Rancid-discuss
mailing list