<div dir="ltr">Is copying the whole *.pm the best way though?  All the default commands/routines included.<div><br></div><div>i.e. <a href="http://junos.pm">junos.pm</a> --> <a href="http://junos_rtr.pm">junos_rtr.pm</a>; which then gets configured in rancid.types.conf</div><div><br></div><div>I add the custom commands/routines to '<a href="http://junos_rtr.pm">junos_rtr.pm</a>', but included all the original commands/routines. Then when an upgrade comes up and there is a fix to the original <a href="http://junos.pm">junos.pm</a>, it's not in the <a href="http://junos_rtr.pm">junos_rtr.pm</a> I created.</div><div><br></div><div>Thinking out loud, is there a way to have a <a href="http://junos_rtr.pm">junos_rtr.pm</a> that includes only my custom commands/routines and leave the original <a href="http://junos.pm">junos.pm</a> intact?</div><div><br></div><div>I want rancid to also run "show system commit":</div><div><br></div><div>i.e. rancid.types.base has:</div><div><div>juniper;script;rancid -t juniper</div><div><div>juniper;login;jlogin</div><div>juniper;module;junos</div><div>juniper;inloop;junos::inloop</div><div>juniper;command;junos::ShowChassisClocks;show chassis clocks</div></div><div><omitted base commands></div><div>juniper;command;junos::ShowConfiguration;show configuration</div></div><div><br></div><div>and rancid.types.conf has:</div><div><div>junos_rtr;script;rancid -t junos_rtr</div><div>junos_rtr;login;jlogin</div><div>junos_rtr;module;junos_rtr</div><div>junos_rtr;inloop;junos_rtr::inloop</div><div>junos_rtr;command;junos_rtr::ShowSystemCommit;show system commit</div></div><div><br></div><div>with the <a href="http://junos_rtr.pm">junos_rtr.pm</a> containing only the minimal configuration needed for the routine to process ShowSystemCommit.</div><div><br></div><div>Having custom commands/routines separated seems like it would be easier to deal with upgrades so that fixes in the provided *.pm files got applied, without having to diff the new base *.pm files against the custom ones.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 21, 2017 at 12:43 PM, Erik Muller <span dir="ltr"><<a href="mailto:erikm@buh.org" target="_blank">erikm@buh.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2/21/17 13:09 , Jason Biel wrote:<br>
> When adding new commands via creating rancid.types.conf and creating a new<br>
> *.pm file, what is the best process with regards to upgrading?<br>
><br>
> I've been running 3.2 with a specific rancid.types.conf file that<br>
> referenced specific *.pm files, but after upgrading to 3.6.2, none of them<br>
> worked because the *.pm files are specifically hard coded to the rancid<br>
> version.  To create my specific *.pm files I just copied the current *.pm<br>
> file from the 3.2 install and made my modifications there, such as the<br>
> commands and the sub-routine.<br>
><br>
> 3.2 - 'use rancid 3.2'<br>
> 3.6.2 - 'use rancid 3.6.2'<br>
><br>
> Is there a better way?<br>
<br>
</span>You should just be able to just leave off the version tag (ie, just "use<br>
rancid;"), to use the current default version.<br>
You should only need to specify the version if you want to make sure it's<br>
consistent with the rest of a package, or need to ensure that some minimum<br>
version is present because you need features in that version or later.<br>
(3.6.2 is obviously > 3.2, so actually that should work - I think the check<br>
breaks because the version numbers have different formats, where one looks<br>
like a number and the other a string?.)<br>
<br>
hth,<br>
-e<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" rel="noreferrer" target="_blank">http://www.shrubbery.net/<wbr>mailman/listinfo/rancid-<wbr>discuss</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Jason<br></div>
</div>