X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=build%2Fupdate_oldconfig;h=6d4d87045063c802e693fbb7c3df7f3ee0b136e7;hp=3332bf7df3115d6e2b3dbe61ff985621c58ddbef;hb=0a714ba01bbcdb43fa2d07e88652be2b8fb1c52f;hpb=bc1afa51e9f1df823e3b9aefb5513609ce1de521 diff --git a/build/update_oldconfig b/build/update_oldconfig index 3332bf7..6d4d870 100755 --- a/build/update_oldconfig +++ b/build/update_oldconfig @@ -1,7 +1,10 @@ #!/usr/bin/expect -f +#enables some diagnostic output +exp_internal 1 + # log all interaction to a file to diagnose failures -log_file [index $argv 0] +log_file -a [lindex $argv 0] # and not stddout log_user 0 @@ -15,27 +18,57 @@ set timeout 30 expect { timeout { - puts "timeout: $expect_out(buffer)" + 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\/y\/m\/\\?] \\(NEW\\)) " { + -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " { puts "$expect_out(1,string) m" send "m\r" exp_continue } - -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " { + -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]* \\\[M\/n\/y\/\\?] \\(NEW\\)) " { + puts "$expect_out(1,string) m" + send "m\r" + exp_continue + } + -re "\n *(\[^\n]* \\\[Y\/n\/m\/\\?] \\(NEW\\)) " { + puts "$expect_out(1,string) m" + send "m\r" + exp_continue + } + -re "\n *(\[^\n]* \\\[Y\/\\?] \\(NEW\\)) " { + puts "$expect_out(1,string) y" + send "y\r" + exp_continue + } }