blob: 89e6c8188414be1897893255d3d94792082ed997 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
/usr/bin/expect -c "spawn telnet $1 5214
expect \"login: \"
send \"localadmin\r\"
expect \"Password: \"
send \"$3\r\"
expect -timeout 60 \"localadmin> \"
send \"device\r\"
expect \"*)> \"
send \"load 1\r\"
expect \"*)> load (1)> \"
send \"$2\r\"
expect \"Are you sure? Type \\\"yes\\\" to proceed: \"
send \"yes\r\"
expect \"*)> load (1)> \"
send \"exit\r\"
expect \"*)> \"
send \"load 2\r\"
expect \"*)> load (2)> \"
send \"$2\r\"
expect \"Are you sure? Type \\\"yes\\\" to proceed: \"
send \"yes\r\"
expect \"*)> load (2)> \"
send \"exit\r\"
expect \"*)> \"
send \"exit\r\"
expect \"*> \"
send \"exit\r\"
expect \"\0\"
"
|