[rancid] Re: Rancid & Fortinet issue

Devon True devon at noved.org
Tue Jun 29 18:21:39 UTC 2010


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

On 6/29/2010 1:53 PM, Smaïne Kahlouch wrote:
> 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:

[snip]

It looks like it may be related to the difference in whitespace.

$ patch -p1 -l < 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: ftlogin
patching file ftlogin

A visual inspection of the diff between nlogin and ftlogin looks good.

Here is a unified diff based off nlogin that should resolve whitespace
issues:

- --- nlogin      2010-03-23 19:33:49.000000000 -0400
+++ ftlogin     2010-06-29 14:17:01.000000000 -0400
@@ -435,7 +435,9 @@
     global in_proc
     set in_proc 1

- -    send "set console page 0\r"
+    send "config system console\r"
+    send "set output standard\r"
+    send "end\r"
     expect -re $prompt {}

     set commands [split $command \;]
@@ -445,7 +447,7 @@
        expect {
            -re "\[\n\r]+"                      { exp_continue }
             -re "$prompt"                      {}
- -           -gl "--- more ---"                  { send " "
+           -gl "--More--"                      { send " "
                                                  exp_continue
                                                }
        }
@@ -485,7 +487,7 @@
        set timeout $timeoutdflt
     }

- -    set prompt {-> }
+    set prompt {# }

     # Figure out passwords
     if { $do_passwd || $do_enapasswd } {
@@ -560,7 +562,9 @@
            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
        catch {close};

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

iEYEARECAAYFAkwqObMACgkQWP2WrBTHBS+jGACgvgNIQkwNt4JmDs0nq3mCmcdI
WsUAoOIuNctechn30WHWEZnKTYruOzGO
=9fYx
-----END PGP SIGNATURE-----


More information about the Rancid-discuss mailing list