aboutsummaryrefslogtreecommitdiffstats
path: root/compass/deploy/remote_excute.exp
diff options
context:
space:
mode:
Diffstat (limited to 'compass/deploy/remote_excute.exp')
-rw-r--r--compass/deploy/remote_excute.exp23
1 files changed, 23 insertions, 0 deletions
diff --git a/compass/deploy/remote_excute.exp b/compass/deploy/remote_excute.exp
new file mode 100644
index 000000000..9dd112b31
--- /dev/null
+++ b/compass/deploy/remote_excute.exp
@@ -0,0 +1,23 @@
+#!/usr/bin/expect
+
+set command [lindex $argv 0]
+set passwd [lindex $argv 1]
+
+eval spawn "$command"
+set timeout 60
+
+expect {
+ -re ".*es.*o.*"
+ {
+ exp_send "yes\r"
+ exp_continue
+ }
+
+ -re ".*sword:" {
+ exp_send "$passwd\r"
+
+ }
+
+}
+
+interact