[rancid] filtering of show license

Václav Ovsík vaclav.ovsik at i.cz
Mon Jul 11 14:01:56 UTC 2016


On Mon, Jul 11, 2016 at 02:29:06PM +0200, Václav Ovsík wrote:
> Hi,
> with Rancid 3.4.1 a new information is digged from IOS using
>     show license
> but it contains relative (changing) time :-/ e.g.:
> 
>     Index 3 Feature: securityk9
> 	    Period left: 5  days 7  hours
> 	    Period Used: 7  weeks 5  days
> 
> have anybody already solved this? (change to end-of-license time or so)

for this time I added only removing:

@@ -587,6 +587,7 @@
 	return(0) if (/% license not supported on this device/i);# show lic on old box
 	return(1) if (/Line has invalid autocommand /);
 	return(1) if (/(invalid (input|command) detected|type help or )/i);
+	s/^(\s*Period (?:left|used)):(?:\s*\d+\s*(?:weeks|days|hours))+/$1: <removed>/i;
 
 	ProcessHistory("COMMENTS","keysort","LICENSE","! $_");
     }

-- 
Zito



More information about the Rancid-discuss mailing list