[rancid] Re: Problems with clogin and Extreme XOS

john heasley heas at shrubbery.net
Wed Mar 22 00:08:42 UTC 2006


Fri, Mar 17, 2006 at 11:23:23AM +0100, Tore Anderson:
> * john heasley
> 
> > when clogin connects, it looks for that weird extreme prompt
> > enumeration and marks the host as an extreme.  with that in mind, it
> > should deal with the * in the prompt and not try to adjust the
> > (global) term length value.
> > 
> > It looks like they changed their prompt format from :N to .N, or does
> > it allow you to do that in the configuration?
> 
>   Wow.  I hadn't even noticed that difference before.  :-)  Patch
>  attached;  makes clogin work flawlessly with XOS as far as I can tell.
>  I've also attached a patch to xrancid that does the same thing, which
>  seems to be required for it to be able to get beyond the first command.
> 
>   It still complains "End of run not found", though.  XOS doesn't have
>  a comment indicating the end of the configuration file like ExtremeWare
>  has.  I've hacked around this by setting $found_end to 1 if I see
>  "# Module vrrp configuration", which is the concluding comment in my
>  config file as I do not use VRRP, but obviously that isn't a generic
>  solution.  :-)  There's another problem, too, that XOS doesn't have
>  "show configuration detail" (only "show configuration"), while
>  ExtremeWare has both.  I will look more into it later;  Perl is easier
>  for me.  Maybe I'll be able to provide a decent patch, even.
> 
> Cheers
> -- 
> Tore Anderson

--- xrancid-orig        2006-03-17 10:50:27.000000000 +0100
+++ xrancid     2006-03-17 11:04:46.000000000 +0100
@@ -448,7 +450,7 @@
        if (!defined($prompt)) {
            $prompt = ($_ =~ /^([^#]+#)/)[0];
            $prompt =~ s/([][}{)(\\])/\\$1/g;
-           $prompt =~ s/:(\d+ ?)#/:\\d+ ?#/;
+           $prompt =~ s/[:\.](\d+ ?)#/[:\\.]\\d+ ?#/;
                           ^ is that necessary?  '.' does not have any
special meaning with in a set atom, iirc.

            $prompt =~ s/\*/\\\*/;
            print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
        }





More information about the Rancid-discuss mailing list