[rancid] avaya P330 - don't match eof

LMR_J-P roger113447 at hotmail.fr
Mon Apr 4 17:45:56 UTC 2011


hi

I have to retrieve a configuration AVAYA P330
I'm stuck at the end of my script.
manually, I have to press enter to retrieve the prompt and I can not
find the piece of code that I miss.
can someone help me, thank you very much

CLOGIN SCRIPT
# Run commands given on the command line.
proc run_commands { prompt command } {
    global in_proc
    set in_proc 1
    log_user 1
    send  "\r"
    expect -re $prompt {}

    set commands [split $command \;]
    set num_commands [llength $commands]
    for {set i 0} {$i < $num_commands} { incr i} {
        send -- "[subst [lindex $commands $i]]\r"

    expect {
            -re "\[\n\r\]"     {exp_continue }
            -gl "--type q to quit or space key to
continue--"              { send "\r\n" ; exp_continue }
                }
        }
 send "quit\r" 
     expect { 
         "\n"                                    { exp_continue } 
         timeout                                 { catch {close}; catch
{wait}; 
                                                   return 0 
                                                } 
         eof                                     { return 0 } 
     } 
   set in_proc 0

  }
____________________
rancid at machine:~/bin$ ./clogin_P330 -c "show l2-module-config" X.X.X.X

set port vlan-binding-mode 3/101 bind-to-all
set port vlan-binding-mode 3/105 bind-to-all

Error: TIMEOUT reached
rancid at machine:~/bin$
_______________________
debug expect
expect: does "\n" (spawn_id exp6) match regular expression "[\n\r]"? (No
Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) "\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\n"
expect: continuing expect

expect: does "" (spawn_id exp6) match regular expression "[\n\r]"? (No
Gate, RE only) gate=yes re=no
"--type q to quit or space key to continue--"? no

expect: timed out

Error: TIMEOUT reached
rancidd at machine: ~/binrancid at machine:~/bin$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20110404/f6fde93a/attachment.html>


More information about the Rancid-discuss mailing list