Resolved! Re: Missing "Image: Software:" for some platforms

Stafford A. Rau srau at rauhaus.org
Mon Dec 5 19:07:58 UTC 2005


* Stafford A. Rau <srau at rauhaus.org> [051115 09:28]:
> I'd like to be able to extract the running IOS version for all of our
> Cisco platforms from the rancid configs, but we're missing the '!Image:
> Software:' lines from some of them.
> 
> Specifically, I don't see it for our 7609s, or 6509s (running native IOS)

Here's the problem, and an easy fix that I'm requesting to be
incorporated in future releases of rancid.

The "IOS" line from show version output on a 7609:

IOS (tm) s72033_rp Software (s72033_rp-ADVIPSERVICESK9_WAN-M), Version 12.2(18)SXE4, RELEASE SOFTWARE (fc2)

Note the underscores in (s72033_rp-ADVIPSERVICESK9_WAN-M).

Here's the regex in Sub ShowVersion in bin/rancid:

        /^(Cisco )?IOS .* Software,? \(([A-Za-z-0-9]*)\), .*Version\s+(.*)$/ &&
            ProcessHistory("COMMENTS","keysort","F1",

Just need to add an underscore to the character set match:

        /^(Cisco )?IOS .* Software,? \(([A-Za-z-0-9_]*)\), .*Version\s+(.*)$/ &&
            ProcessHistory("COMMENTS","keysort","F1",

Now I get the correct Image: line in our 6500 and 7600 rancid configs:

!Image: Software: s72033_rp-ADVIPSERVICESK9_WAN-M, 12.2(18)SXE4, RELEASE SOFTWARE (fc2)

Thanks,
--Stafford



More information about the Rancid-discuss mailing list