[rancid] End of config in Extreme Switches
heasley
heas at shrubbery.net
Thu Oct 3 15:41:50 UTC 2013
Thu, Oct 03, 2013 at 09:13:48AM +0100, Paul Thornton:
> Hi
>
> The issue here is that I've found that EXOS/Extremeware doesn't always
> echo that 'exit' back reliably before the connection is closed. Again,
> it was a long time ago, but I recall problems relying on that for
> found_end and/or clean_run getting set.
for starters, the main loop also expects to see the exit.
> I think the most sensible option is to go with Alan's suggestion to
> assume all is good if we get at least 5 lines of config.
thats already there, i think, in 2.3.8. of course, it does not deal with
low memory errors like seen on ciscos. another solution might be to add
a \n command and look for the empty prompt line; which is a separate set
of ugliness.
> I've been tied up with other things so far this week, but I want to do
> some tests on using both the clean xrancid from 2.3.8 and then xrancid
> patched for the 'have 5 lines so ok' test. I hope to do this later
> today and will report back.
>
> Paul.
>
> On 03/10/2013 01:52, James Andrewartha wrote:
> > On 02/10/13 18:09, Alan McKinnon wrote:
> >> To me that's a more sensible approach - you can't include checks for
> >> markers that do not exist in the output.
> >
> > The entrancid (Enterasys) I have looks like it matches on the exit
> > command sent by entlogin itself to set $found_end:
> >
> > sub ShowConfig {
> > print STDERR " In ShowConfig: $_" if ($debug);
> >
> > while (<INPUT>) {
> > <snip>
> > }
> > if (/exit/) {
> > $found_end = 1;
> > $clean_run = 1;
> > return(1);
> > }
> > return(0);
> > }
> >
>
> --
> Paul Thornton
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
More information about the Rancid-discuss
mailing list