<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>One thing you could do to fit in with rancid's normal mode of
operation, which is basically printing the output using something
like ProcessHistory, is to make have the usual ranci and login
files, maybe snlogin and snrancid, or sfwlogin or whatever. The
login file takes care of logging into the device and executing the
commands as usual. You can usually just copy another login, or
maybe even the standard clogin will work for that.</p>
<p>The rancid file will do something a bit different though. It will
still execute clogin as normal, but you'll have only one
subroutine, maybe called ExportConfig.</p>
<p>@commandtable will have a single line that has the command to
execute on the left as the key and the subroutine on the right as
the value.</p>
<p>This is where things diverge from traditional rancid. Instead of
the command generating output that is filtered, you'll be
executing your command export via scp or ftp and storing it in a
temporary directory on your rancid server, probably as the rancid
user so that you can clean it up. Your callback will probably wait
until the command is complete, then mv the file from /tmp into the
currenct directory and rename it to <device>.new.</p>
<p>That's the key. Now that <device>.new is there, rancid can
svn commit it and you get all the behavior that you are accustomed
to.<br>
</p>
<br>
<div class="moz-cite-prefix">On 10/3/2017 3:54 PM, Kyle Tucker
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20171003195424.GA12609@panix.com">
<pre wrap="">Hi all,
I've had RANCID with Subversion/WebSVN in place for a few years with
great success for Cisco gear. I am trying to tackle SonicWall firewalls
with not much success. I've managed to write my own shell/expect script
the log onto the SonicWalls and ftp the configs back down where I can
compare the current and previous configs and upon a change, log back on
and download the exported "exp" image and I like this method. I also was
able to get the configs initially into RANCID but without a working
clogin/sonlogin script, updates aren't being seen. I tried to simply
copy in a $host.new file but that triggered nothing but it was cleaned
up. Is there a way I can copy the file in or otherwise inject it into
RANCID so that rancid-run could accept it and trigger the normal actions
a diff would trigger? Any thoughts or suggestions appreciated.
Thanks in advance.
Kyle
_______________________________________________
Rancid-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a>
<a class="moz-txt-link-freetext" href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<table>
<tbody>
<tr>
<td style="padding-left: 20px" width="90%">Doug Hughes<br>
Keystone NAP<br>
Fairless Hills, PA<br>
1.844.KEYBLOCK (539.2562)</td>
<td style="align: right;padding-right: 20px"><img
src="cid:part1.44417EAD.A99E05AD@keystonenap.com">
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>