From: Rob H. <for...@us...> - 2002-07-11 08:11:38
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv19370/bin Modified Files: sandweb-expect Log Message: hmm, the way I was doing error checking was causing expect to generate weird error codes ( $? == 768 ), only one "expect" statement can be used per block it seems, but you can expect as many phrases within that block as you wish. cool :) Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.7 retrieving revision 1.8 diff -U2 -r1.7 -r1.8 --- sandweb-expect 24 Jun 2002 20:28:32 -0000 1.7 +++ sandweb-expect 11 Jul 2002 08:11:35 -0000 1.8 @@ -22,11 +22,4 @@ expect { "Password:" { send "$system_password\r" } - eof { - send_user "Unexpected EOF\r\n" - exit 3 - } - } - - expect { "password:" { send "$vcs_password\r" } "Sorry." { @@ -40,5 +33,4 @@ } } - } @@ -52,15 +44,12 @@ expect { "Password:" { send "$system_password\r" } - eof { - send_user "Unexpected EOF\r\n" - exit 3 - } - } - - expect { "Sorry." { send "Invalid system username/password\r" exit 1 } + eof { + send_user "Unexpected EOF\r\n" + exit 3 + } } } @@ -74,11 +63,4 @@ expect { "password:" { send "$vcs_password\r" } - "Are you sure" { send "yes\r" } - eof { - send_user "Unexpected EOF\r\n" - exit 3 - } - } - expect { "Are you sure" { send "yes\r" } "Permission denied" { |