[rancid] NX-OS 6.1.4/Fan Zone Speed

heasley heas at shrubbery.net
Mon Dec 16 18:02:32 UTC 2013


Sun, Dec 15, 2013 at 07:32:01PM +0200, Alan McKinnon:
> Removing "sh env" from nxrancid for everyone is not a good idea, I would
> be most upset if an update shipped with that change.
> 
> Rather just modify your local copy of nxrancid. Add a regex check to
> detect a line starting with "!Env: Fan Zone Speed:" ans skip that line.
> The rancid code has many examples of doing this (it's one of rancid's
> primary functions), just copy the existing style.
> 
> The function to modify is ShowEnv()

against 2.3.8

Index: bin/nxrancid.in
===================================================================
--- bin/nxrancid.in	(revision 2712)
+++ bin/nxrancid.in	(working copy)
@@ -312,6 +312,7 @@
 	return(-1) if (/command authorization failed/i);
 
 	s/ +$//;	# Drop trailing ' '
+	next if (/Fan Zone Speed:/);
 	ProcessHistory("COMMENTS","","","!Env: $_");
     }
     ProcessHistory("COMMENTS","","","!\n");



More information about the Rancid-discuss mailing list