1 |
|
2 |
|
3 | set cdbPath [lindex $argv 0]
|
4 | set cdbDevice [lindex $argv 1]
|
5 | set sopFilename [lindex $argv 2]
|
6 |
|
7 | set timeout 1000
|
8 |
|
9 | spawn $cdbPath -s $cdbDevice shell
|
10 | expect {
|
11 | "developer@" {
|
12 | send "exit\r"
|
13 | spawn $cdbPath -s $cdbDevice shell "/usr/bin/ins-tool -siu /tmp/$sopFilename && rm -f /tmp/$sopFilename"
|
14 | }
|
15 | "root@" {
|
16 | send "su install\r"
|
17 | expect "install@" {
|
18 | send "/usr/bin/ins-tool -siu /tmp/$sopFilename && exit\r"
|
19 | expect "root@" {send "rm -f /tmp/$sopFilename && exit\r"}
|
20 | }
|
21 | }
|
22 | }
|
23 | expect eof |
\ | No newline at end of file |