X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=build%2Fupdate_oldconfig;h=5dd030fd72b2da564855ccf9ee05fb36f3e4d363;hp=e04e5fa6e02d125d9f9794ffb3a0187a0cf34d80;hb=1e2530982ee0bab9e0f2be7f0b197b68ba99b015;hpb=747f99c557dd88b7c16afe645fed9e15fde0cc44 diff --git a/build/update_oldconfig b/build/update_oldconfig index e04e5fa..5dd030f 100755 --- a/build/update_oldconfig +++ b/build/update_oldconfig @@ -1,29 +1,59 @@ -#!/usr/bin/expect +#!/usr/bin/expect -f + +# log all interaction to a file to diagnose failures +log_file -a [lindex $argv 0] + +# and not stddout +log_user 0 -log_user 1 set spawnid [spawn make oldconfig] -match_max 200 +#match_max 200 # need to allow for the config tool to be built initially set timeout 30 expect { timeout { - puts "timeout" + puts "timeout in update_oldconfig waiting for a prompt we recognize" 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\\)) " { + puts "$expect_out(1,string) m" + send "m\r" + exp_continue + } + -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 + } + -re "\n *(\[^\n]* \\\[M\/n\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) m" send "m\r" exp_continue } - -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " { + -re "\n *(\[^\n]* \\\[M\/n\/y\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) m" send "m\r" exp_continue