[rancid] Fortigate false notifications

john heasley heas at shrubbery.net
Mon Jul 18 18:28:57 UTC 2011


Mon, Jul 18, 2011 at 04:56:36PM +0100, Andy:
> If you haven't disabled the pager in fnlogin, then that is worth a try.
> 
> I found that disabling the console pager improved things quite a lot, but I
> still see this happen occasionally on various different Fortigate models and
> OS versions.

agreed.  you can try the attached more complex handling from clogin.  I'm
guessing a bit; it might need more tweaking to handle however this device
wipes the pager prompt.

-------------- next part --------------
Index: fnlogin.in
===================================================================
--- fnlogin.in	(revision 2318)
+++ fnlogin.in	(working copy)
@@ -448,6 +448,9 @@
     expect -re $prompt; send -- "end\r"
     expect -re $prompt;
 
+    # this is the only way i see to get rid of more prompts in o/p..grrrrr
+    log_user 0
+
     set commands [split $command \;]
     set num_commands [llength $commands]
     for {set i 0} {$i < $num_commands} { incr i} {
@@ -456,10 +459,12 @@
             -re "$prompt"			{ send "\r"
 						  sleep 0.5
 						}
-	    -gl "--More--"			{ send " "
+	    -gl "--More--\[^\n\r]*"		{ send " "
 						  exp_continue
-	    -re "\[\n\r]+"			{ exp_continue }
 						}
+	    -re "\[^\r\n]*\[\n\r]+"             { send_user -- "$expect_out(buffer)"
+						  exp_continue
+						}
 	}
      }
      expect {


More information about the Rancid-discuss mailing list