[rancid] Re: Rancid & Fortinet issue

Smaïne Kahlouch smainklh at free.fr
Tue Jun 29 18:15:40 UTC 2010


Don't worry i'll modify it by hand.
Thanks again

-------- Message initial --------
De: Smaïne Kahlouch <smainklh at free.fr>
À: Devon True <devon at noved.org>
Cc: rancid-discuss at shrubbery.net
Sujet: [rancid] Re: Rancid & Fortinet issue
Date: Tue, 29 Jun 2010 19:53:56 +0200

Hi Devon,

Thanks a lot for your help. Is that work for rancid-2.3.3 ?
I just tried that but it doesn't work for me.
Here is what i did, maybe i'm mistaken :

# cp nlogin ftlogin
# patch -p1 < /home/ipoc/ftlogin.diff

missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- nlogin      2010-06-16 14:36:18.000000000 +0000
|+++ ftlogin     2010-06-17 17:28:20.000000000 +0000
--------------------------
File to patch: /usr/lib/rancid/bin/ftlogin
patching file /usr/lib/rancid/bin/ftlogin
Hunk #2 FAILED at 448.
Hunk #3 FAILED at 488.
patch unexpectedly ends in middle of line
Hunk #4 FAILED at 563.
3 out of 4 hunks FAILED -- saving rejects to
file /usr/lib/rancid/bin/ftlogin.rej

# cat /usr/lib/rancid/bin/ftlogin.rej
***************
*** 445,451 ****
         expect {
             -re "\[\n\r]+"                      { exp_continue }
              -re "$prompt"                      {}
-            -gl "--- more ---"                  { send " "
                                                   exp_continue
                                                 }
         }
--- 448,454 ----
         expect {
             -re "\[\n\r]+"                      { exp_continue }
              -re "$prompt"                      {}
+            -gl "--More-- "                     { send " "
                                                   exp_continue
                                                 }
         }
***************
*** 485,491 ****
         set timeout $timeoutdflt
      }

-     set prompt {-> }

      # Figure out passwords
      if { $do_passwd || $do_enapasswd } {
--- 488,494 ----
         set timeout $timeoutdflt
      }

+     set prompt {# }

      # Figure out passwords
      if { $do_passwd || $do_enapasswd } {
***************
*** 560,566 ****
             continue
         }
      } elseif { $do_script } {
-        send "set console page 0\r"
         expect -re $prompt      {}
         source $sfile

--- 563,572 ----
             continue
         }
      } elseif { $do_script } {
+        #send "set console page 0\r"
+         send "config system console\r"
+         send "set output standard\r"
+         send "end\r"
         expect -re $prompt      {}
         source $sfile



-------- Message initial --------
De: Devon True <devon at noved.org>
À: Smaïne Kahlouch <smainklh at free.fr>
Cc: rancid-discuss at shrubbery.net
Sujet: Re: [rancid] Rancid & Fortinet issue
Date: Tue, 29 Jun 2010 11:55:23 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/28/2010 4:09 PM, Smaïne Kahlouch wrote:
> Hi everyone,
> 
> I just finished to install Rancid, everything works fine with CISCO
> equipments but i still have some issue for backing up my Fortigate
> firewalls.
> 
> I've seen these patches and wanted to know if it could be applied to the
> current version 2.3.3
> http://www.shrubbery.net/pipermail/rancid-discuss/2009-June/004005.html
> 
> I have the same problem as describe here
> <http://www.shrubbery.net/pipermail/rancid-discuss/2009-April/003898.html>
> What should i change to solve my problem ? My prompt is like
> "FGT[model][s/n] # "

Attached are the fnrancid.diff and ftlogin.diff I wrote to backup
Fortigate devices. I did not try the patches you link; I opted to
troubleshoot and write my own.

I basically copied the nlogin script included in the rancid tarball to
ftlogin and then applied the attached diff. I also patched fnrancid
included with rancid.

Some of the modifications may not be necessary and thanks for John
Heasley for some behind-the-scenes advice. These modifications work for
me running a mixture of v3 and v4 FortiOS on several devices.

- --
Devon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwqF2sACgkQWP2WrBTHBS/8PgCgyPZkEbXveBiASIAQVsyqjeux
m48AoKbsTHFmOX/U7Sq2e51VWSo/AfGs
=ld8H
-----END PGP SIGNATURE-----


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss




More information about the Rancid-discuss mailing list