Whamcloud - gitweb
Try to get some more information when update_oldconfig fails. Probably some
[fs/lustre-release.git] / build / update_oldconfig
index 8944617..3332bf7 100755 (executable)
@@ -1,6 +1,11 @@
-#!/usr/bin/expect -d
+#!/usr/bin/expect -f
 
+# log all interaction to a file to diagnose failures
+log_file [index $argv 0]
+
+# and not stddout
 log_user 0
+
 set spawnid [spawn make oldconfig]
 
 #match_max 200
@@ -10,7 +15,7 @@ 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"