Whamcloud - gitweb
Try to get some more information when update_oldconfig fails. Probably some
[fs/lustre-release.git] / build / update_oldconfig
1 #!/usr/bin/expect -f
2
3 # log all interaction to a file to diagnose failures
4 log_file [index $argv 0]
5
6 # and not stddout
7 log_user 0
8
9 set spawnid [spawn make oldconfig]
10
11 #match_max 200
12
13 # need to allow for the config tool to be built initially
14 set timeout 30
15
16 expect {
17     timeout {
18         puts "timeout: $expect_out(buffer)"
19         exit 1
20     }
21     -re "\n  *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " {
22          puts "$expect_out(1,string) n"
23          send "n\r"
24          exp_continue
25     }
26     -re "\n  *(\[^\n]* \\\[N\/m\/y\/\\?] \\(NEW\\)) " {
27         puts "$expect_out(1,string) m"
28         send "m\r"
29         exp_continue
30     }
31     -re "\n*(\[^\n]* \\\[N\/y\/m\/\\?] \\(NEW\\)) " {
32         puts "$expect_out(1,string) m"
33         send "m\r"
34         exp_continue
35     }
36     -re "\n  *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " {
37         puts "$expect_out(1,string) m"
38         send "m\r"
39         exp_continue
40     }
41 }