[rancid] Re: !VLAN: % Ambiguous command: "show vlan"

john heasley heas at shrubbery.net
Tue Jul 25 12:05:08 UTC 2006


Thu, Jun 29, 2006 at 11:51:57PM +0200, Michael Stefaniuc:
> Robin Mordasiewicz wrote:
> > I am noticing an error in the output
> > 
> > "!VLAN: % Ambiguous command:  "show vlan""
> I get the same on 38xx and 37xx Cisco routers and planned to fix it but
> it's not a priority. The correct fix would be to run on those boxes a
> sh vlan-switch
> 
> bye
> 	michael
> 
> > 
> > 
> > my device is
> > NAME: "2821 chassis",         DESCR: "2821 chassis"
> > !Image: Software: C2800NM-IPBASE-M, 12.4(5a), RELEASE SOFTWARE (fc3)
> > !Image: Compiled: Sat 14-Jan-06 03:19 by alnguyen
> > !Image: flash:c2800nm-ipbase-mz.124-5a.bin
> > !
> > !ROM Bootstrap: Version 12.4(1r) [hqluong 1r], RELEASE SOFTWARE (fc1)

Index: rancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/rancid.in,v
retrieving revision 1.204
diff -u -1 -0 -r1.204 rancid.in
--- rancid.in	28 May 2006 16:38:52 -0000	1.204
+++ rancid.in	30 Jun 2006 00:11:25 -0000
@@ -1358,20 +1358,21 @@
     print STDERR "    In ShowVLAN: $_" if ($debug);
 
     ($_=<INPUT>,return(1)) if (!$DO_SHOW_VLAN);
 
     while (<INPUT>) {
 	tr/\015//d;
 	last if (/^$prompt/);
 	next if (/^(\s*|\s*$cmd\s*)$/);
 	return(1) if /Line has invalid autocommand /;
 	return(1) if /(Invalid input detected|Type help or )/;
+	return(1) if /Ambiguous command/i;
 	# 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
 	if (/^(<-+ More -+>)/) {
 	    my($len) = length($1);
 	    s/^$1\s{$len}//;
 	}
@@ -1754,20 +1755,21 @@
 	{'show controllers cbus'	=> 'ShowContCbus'},
 	{'show diagbus'			=> 'ShowDiagbus'},
 	{'admin show diag'		=> 'ShowDiag'},
 	{'show diag'			=> 'ShowDiag'},
 	{'show module'			=> 'ShowModule'},	# cat 6500-ios
 	{'show spe version'		=> 'ShowSpeVersion'},
 	{'show c7200'			=> 'ShowC7200'},
 	{'show inventory raw'		=> 'ShowInventory'},
 	{'show vtp status'		=> 'ShowVTP'},
 	{'show vlan'			=> 'ShowVLAN'},
+	{'show vlan-switch'		=> 'ShowVLAN'},
 	{'show debug'			=> 'ShowDebug'},
 	{'show running-config'		=> 'WriteTerm'},
 	{'write term'			=> 'WriteTerm'},
 );
 # Use an array to preserve the order of the commands and a hash for mapping
 # commands to the subroutine and track commands that have been completed.
 @commands = map(keys(%$_), @commandtable);
 %commands = map(%$_, @commandtable);
 
 $cisco_cmds=join(";", at commands);




More information about the Rancid-discuss mailing list