From: brian Date: Mon, 20 Mar 2006 18:48:33 +0000 (+0000) Subject: Recognize and answer an additional expression. X-Git-Tag: v1_7_100~524 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5da992cce94fa944672b72734c9a0965762837ec Recognize and answer an additional expression. Be a bit more liberal with the format of the questions. --- diff --git a/build/update_oldconfig b/build/update_oldconfig index e50a4e3..033b744 100755 --- a/build/update_oldconfig +++ b/build/update_oldconfig @@ -1,7 +1,7 @@ #!/usr/bin/expect -f # log all interaction to a file to diagnose failures -log_file [lindex $argv 0] +log_file -a [lindex $argv 0] # and not stddout log_user 0 @@ -15,27 +15,37 @@ set timeout 30 expect { timeout { - puts "timeout: $expect_out(buffer)" + puts "timeout" exit 1 } - -re "\n *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " { + -re "\n *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) n" send "n\r" exp_continue } - -re "\n *(\[^\n]* \\\[N\/m\/y\/\\?] \\(NEW\\)) " { + -re "\n *(\[^\n]* \\\[N\/m\/y\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) m" send "m\r" exp_continue } - -re "\n*(\[^\n]* \\\[N\/y\/m\/\\?] \\(NEW\\)) " { + -re "\n *(\[^\n]* \\\[N\/y\/m\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) m" send "m\r" exp_continue } - -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " { + -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) m" send "m\r" exp_continue } + -re "\n *(\[^\n]* \\\[Y\/n\/\\?] \\(NEW\\)) " { + puts "$expect_out(1,string) y" + send "y\r" + exp_continue + } + -re "\n *(\[^\n]* \\\[\[0-9]*] \\(NEW\\)) " { + puts "$expect_out(1,string) " + send "\r" + exp_continue + } }