Whamcloud - gitweb
Apparently it's lindex, not index.
[fs/lustre-release.git] / build / update_oldconfig
index e04e5fa..e50a4e3 100755 (executable)
@@ -1,16 +1,21 @@
-#!/usr/bin/expect
+#!/usr/bin/expect -f
+
+# log all interaction to a file to diagnose failures
+log_file [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: $expect_out(buffer)"
         exit 1
     }
     -re "\n  *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " {
@@ -23,6 +28,11 @@ expect {
         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"