[rancid] Adding IOS Commands to Rancid 3.1

heasley heas at shrubbery.net
Thu Apr 9 15:13:50 UTC 2015


Wed, Apr 08, 2015 at 07:58:03PM -0400, Chip Pleasants:
> Thank you very much for assisting. Was I right in modifying the ios.pm?  By

you can do that; again it will be overwritten by the next installation.
you can create a separate pm for this command and include it with another
module line - i cant recall if i added that in 3.1 or 3.2.

> definition do you mean something like below? I'm assuming if I wanted to
> use this definition I'd have to change devices in router.db that I wanted
> to run this command on?  If it does work this way I suppose I'll want to
> add all the other commands normally baked in the cisco definition?

yes, yes, yes.

> 
> # Custom Commands for Cisco IOS devices
> cisco-custom;script;rancid -t cisco
> cisco-custom;login;clogin
> cisco-custom;module;ios
> cisco-custom;inloop;ios::inloop
> cisco-custom;command;ios::ShowArchiveConfigDiff;show archive config diff

cisco-custom;module;ios
cisco-custom;module;myios
cisco-custom;command;ios::ShowVersion;show version
cisco-custom;command;ios::etc etc
cisco-custom;command;myios::ShowArchiveConfigDiff;show archive config diff

or if you wanted ShowVersion to do something different; you could create
your own:
cisco-custom;module;myios
cisco-custom;command;myios::ShowVersion;show version
cisco-custom;command;ios::etc etc


More information about the Rancid-discuss mailing list