修复:#匹配不到
This commit is contained in:
parent
1459a88322
commit
fe12a2d5ea
|
@ -26,7 +26,7 @@ expect {
|
|||
|
||||
"yes/no" { send "yes\r"; exp_continue }
|
||||
|
||||
"*$ " {
|
||||
"*$ " | "*# " {
|
||||
# 从跳板机复制文件到目标主机
|
||||
send "scp -P $remote_port -r $temp_file $remote_user@$remote_host:$remote_file\r"
|
||||
expect {
|
||||
|
@ -34,9 +34,9 @@ expect {
|
|||
send "yes\r"
|
||||
exp_continue
|
||||
}
|
||||
"*$ " {
|
||||
"*$ " | "*# " {
|
||||
send "rm $temp_file\r"
|
||||
expect "*$ " {send "exit\r"}
|
||||
expect "*$ " | "*# " {send "exit\r"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ expect {
|
|||
|
||||
"yes/no" { send "yes\r"; exp_continue }
|
||||
|
||||
"*$ " {
|
||||
"*$ " | "*# " {
|
||||
send "ssh -p $remote_port $remote_user@$remote_host $ssh_cmd\r"
|
||||
expect {
|
||||
|
||||
"yes/no" { send "yes\r"; exp_continue }
|
||||
|
||||
"*$ " {send "exit\r"}
|
||||
"*$ " | "*# " {send "exit\r"}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue