update_oldconfig

来自「lustre 1.6.5 source code」· 代码 · 共 75 行

TXT
75
字号
#!/usr/bin/expect -f#enables some diagnostic outputexp_internal 1# log all interaction to a file to diagnose failureslog_file -a [lindex $argv 0]# and not stddoutlog_user 0set spawnid [spawn make oldconfig]#match_max 200# need to allow for the config tool to be built initiallyset timeout 30expect {    timeout {        puts "timeout in update_oldconfig waiting for a prompt we recognize"        exit 1    }    -re "\n *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " {         puts "$expect_out(1,string) n"         send "n\r"         exp_continue    }    -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) <cr>"        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    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?