<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>small 6500/7600 ShowVersion bug in bin/rancid</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">sorry, not sure if this was already noted.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">I had few Catalyst 6500/7600 routers that rancid was missing the IOS image line. the show ver output is like this:</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">IOS (tm) s72033_rp Software (s72033_rp-ADVIPSERVICESK9_WAN-M), Version 12.2(18)SXF4, RELEASE SOFTWARE (fc1)</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">the reason for the problem is the underscore sign inside the brackets. (the regexp was looking for [A-Za-z-0-9])</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">my fix:</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">@@ -160,7 +160,7 @@</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> # PIX fail-over license</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> /^This PIX has an?\s+(.*)$/ &&</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> ProcessHistory("COMMENTS","keysort","C1", "!$_") && next;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">- /^(Cisco )?IOS .* Software,? \(([A-Za-z-0-9]*)\), .*Version\s+(.*)$/ &&</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">+ /^(Cisco )?IOS .* Software,? \((.*)\), .*Version\s+(.*)$/ &&</FONT></SPAN></P>
<BR>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">I have a feeling that we are playing a game here with Cisco developers, they want to test how complex does one regexp should be in order to match all show version possible outputs.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Yuval</FONT></SPAN></P>
</BODY>
</HTML>