cisco 9509 fiber switch not working

Hopper, Faron W. faron.hopper at capgemini.com
Fri Dec 16 14:58:48 UTC 2005


Okay John that seemed to get me more information.  I hope this one
contains what you are looking for.

netcfgbak at ckcus0002-cfgbak01$
netcfgbak at ckcus0002-cfgbak01$ diff -c -20 rancid rancid.bak
*** rancid      Thu Dec 15 17:25:17 2005
--- rancid.bak  Thu Dec 15 15:38:53 2005
***************
*** 1112,1154 ****
        # newer releases (~12.1(9)) place the vlan config in the normal
        # configuration (write term).
        return(1) if ($type =~ /^(3550|4500|7600)$/);
        #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/);
        return(-1) if (/command authorization failed/i);
        # the pager can not be disabled per-session on the PIX
        s/^<-+ More -+>\s*//;
        ProcessHistory("COMMENTS","keysort","IO","!VLAN: $_");
      }
      ProcessHistory("COMMENTS","keysort","IO","!\n");
      return(0);
  }

  # This routine processes a "write term"
  sub WriteTerm {
      print STDERR "    In WriteTerm: $_" if ($debug);
      my($lineauto,$comment,$linecnt) = (0,0,0);

      while (<INPUT>) {
        tr/\015//d;
!       last if (/^$prompt/);
        return(-1) if (/command authorization failed/i);
!       return(1) if /(invalid input detected|iype help or )/i;
        # the pager can not be disabled per-session on the PIX
        s/^<-+ More -+>\s*//;
        /Non-Volatile memory is in use/  && return(-1); # NvRAM is
locked
        return(0) if ($found_end);              # Only do this routine
once
        $linecnt++;
        $lineauto = 0 if (/^[^ ]/);
        # skip the crap
        if (/^(##+$|(Building|Current) configuration)/i) {
            while (<INPUT>) {
                next if (/^Current configuration\s*:/i);
                next if (/^:/);
                next if (/^([%!].*|\s*)$/);
                next if (/^ip add.*ipv4:/);     # band-aid for 3620
12.0S
                last;
            }
            if (defined($config_register)) {
                ProcessHistory("","","","!\nconfig-register
$config_register\n");
            }
            tr/\015//d;
        }
--- 1112,1154 ----
        # newer releases (~12.1(9)) place the vlan config in the normal
        # configuration (write term).
        return(1) if ($type =~ /^(3550|4500|7600)$/);
        #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/);
        return(-1) if (/command authorization failed/i);
        # the pager can not be disabled per-session on the PIX
        s/^<-+ More -+>\s*//;
        ProcessHistory("COMMENTS","keysort","IO","!VLAN: $_");
      }
      ProcessHistory("COMMENTS","keysort","IO","!\n");
      return(0);
  }

  # This routine processes a "write term"
  sub WriteTerm {

      print STDERR "    In WriteTerm: $_" if ($debug);
      my($lineauto,$comment,$linecnt) = (0,0,0);

      while (<INPUT>) {
        tr/\015//d;
!       last if(/^$prompt/);
        return(-1) if (/command authorization failed/i);
!       return(1) if /(Invalid input detected|Type help or )/;
        # the pager can not be disabled per-session on the PIX
        s/^<-+ More -+>\s*//;
        /Non-Volatile memory is in use/  && return(-1); # NvRAM is
locked
        return(0) if ($found_end);              # Only do this routine
once
        $linecnt++;
        $lineauto = 0 if (/^[^ ]/);
        # skip the crap
        if (/^(##+$|(Building|Current) configuration)/i) {
            while (<INPUT>) {
                next if (/^Current configuration\s*:/i);
                next if (/^:/);
                next if (/^([%!].*|\s*)$/);
                next if (/^ip add.*ipv4:/);     # band-aid for 3620
12.0S
                last;
            }
            if (defined($config_register)) {
                ProcessHistory("","","","!\nconfig-register
$config_register\n");
            }
            tr/\015//d;
        }

Faron

-----Original Message-----
From: john heasley [mailto:heas at shrubbery.net]
Sent: Thursday, December 15, 2005 7:59 PM
To: Hopper, Faron W.
Subject: Re: cisco 9509 fiber switch not working

Thu, Dec 15, 2005 at 08:51:06PM -0500, Hopper, Faron  W.:
>
> John,
> 	Here is the diff -20.

your diff stinks.  -20 is supposed to add context on either side of the
change(s).  try diff -c -20

> netcfgbak at ckcus0002-cfgbak01$ diff -20 rancid rancid.bak
> 1132c1132
> <       last if (/^$prompt/);
> ---
> >       last if(/^$prompt/);
> 1134c1134
> <       return(1) if /(invalid input detected|iype help or )/i;
> ---
> >       return(1) if /(Invalid input detected|Type help or )/;
> netcfgbak at ckcus0002-cfgbak01$
>
>
>
> Thanks,
> Faron
>
> -----Original Message-----
> From: john heasley [mailto:heas at shrubbery.net]
> Sent: Thursday, December 15, 2005 6:29 PM
> To: Hopper, Faron W.
> Subject: Re: cisco 9509 fiber switch not working
>
> Thu, Dec 15, 2005 at 06:39:25PM -0500, Hopper, Faron  W.:
> >
> > John,
> >     I change the lines by hand.  I edited the lines that had a -
> symbol
> > beside them and change them to what the line looked like with the +
> > symbol.  Here is the diff
> >
> > ckcus0002-cfgbak01# diff rancid rancid.bak
> > 1132c1132
> > <       last if (/^$prompt/);
> > ---
> > >       last if(/^$prompt/);
> > 1134c1134
> > <       return(1) if /(invalid input detected|iype help or )/i;
> > ---
> > >       return(1) if /(Invalid input detected|Type help or )/;
> >
> > If I did that right, then I ran the rancid -d cod-cisco-9509-1
command
> > and received the same results (listed below).  Thanks, Faron
>
> that looks right, but please send a diff to me with the option -20




More information about the Rancid-discuss mailing list