<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal">I finally got rancid working with some of my fortigates courtesy of Diego Ercolani patch
<o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.shrubbery.net/pipermail/rancid-discuss/2009-June/004005.html">http://www.shrubbery.net/pipermail/rancid-discuss/2009-June/004005.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">now one of my firewalls uses VDOM so for me to get the full configuration I need to type in the command config global before the show full-configuration command<o:p></o:p></p>
<p class="MsoNormal">I tried to edit the fnrancid script that Diego wrote by creating a dummy function (maybe it shouldn’t be a dummy function, but I’m not sure what to put in it<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">sub GetGlobal {<o:p></o:p></p>
<p class="MsoNormal"> print STDERR " In GetGlobal: $_" if ($debug);<o:p></o:p></p>
<p class="MsoNormal"> return(0);<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And then I modified the command table as follows using the function from above<o:p></o:p></p>
<p class="MsoNormal">@commandtable = (<o:p></o:p></p>
<p class="MsoNormal"> {'get system status' => 'GetSystem'},<o:p></o:p></p>
<p class="MsoNormal"> {'config global' => 'GetGlobal'},<o:p></o:p></p>
<p class="MsoNormal"> {'show full-configuration' => 'GetConf'}<o:p></o:p></p>
<p class="MsoNormal">);<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I run fnlogin on this firewall here is my output<o:p></o:p></p>
<p class="MsoNormal">[rancid@pwcolorancid bin]$ /usr/local/rancid/bin/fnrancid -d pwcolofgt100c<o:p></o:p></p>
<p class="MsoNormal">executing fnlogin -t 90 -c"get system status;config global;show full-configuration" pwcolofgt100c<o:p></o:p></p>
<p class="MsoNormal">HIT COMMAND:FGT100C3G0860259~ # get system status<o:p></o:p></p>
<p class="MsoNormal"> In GetSystem: FGT100C3G0860259~ # get system status<o:p></o:p></p>
<p class="MsoNormal">HIT COMMAND:FGT100C3G0860259~ # config global<o:p></o:p></p>
<p class="MsoNormal">Vendor: FGT100C3G0860259~ # config global<o:p></o:p></p>
<p class="MsoNormal">HIT COMMAND:FGT100C3G0860259~ # config global<o:p></o:p></p>
<p class="MsoNormal">pwcolofgt100c: found unexpected command - "config global"<o:p></o:p></p>
<p class="MsoNormal">pwcolofgt100c: missed cmd(s): show full-configuration<o:p></o:p></p>
<p class="MsoNormal">pwcolofgt100c: missed cmd(s): show full-configuration<o:p></o:p></p>
<p class="MsoNormal">0: found end<o:p></o:p></p>
<p class="MsoNormal">pwcolofgt100c: End of run not found<o:p></o:p></p>
<p class="MsoNormal">pwcolofgt100c: End of run not found<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">any advice how to edit this to make it work?<o:p></o:p></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
The information contained in this email is confidential and may also contain privileged information. Sender does not waive confidentiality or legal<br>
privilege. If you are not one of the intended recipients, please notify the sender immediately and destroy this e-mail; you must not copy,<br>
distribute or take any action in reliance on the information contained within.<br>
Internet communications are not secure or error free and the sender does not accept any liability for the content of the email. Although emails are<br>
routinely screened for viruses, the sender does not accept responsibility for any damage caused. Replies to this email may be monitored.<br>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
</font>
</body>
</html>