1 | #!/usr/bin/expect
|
2 |
|
3 | set ip [lindex $argv 0]
|
4 | set port [lindex $argv 1]
|
5 | set sopid [lindex $argv 2]
|
6 | set sopFilename [lindex $argv 3]
|
7 |
|
8 | set timeout 1000
|
9 | spawn ssh -p $port developer@$ip "/usr/bin/ins-tool -siu /tmp/$sopFilename && rm -f /tmp/$sopFilename"
|
10 | expect {
|
11 | "(yes/no)?" {send "yes\r"; exp_continue}
|
12 | "assword:" {send "system\r"}
|
13 | }
|
14 | expect eof |
\ | No newline at end of file |