diff options
author | ZachIR <zachir@librem.one> | 2023-01-10 15:41:53 -0600 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2023-01-10 15:41:53 -0600 |
commit | 9ab20abcd3e0f7172a4e94e6cf431b0b7f5d538e (patch) | |
tree | 09b41f9459913298567f2c40065d9504d1cb0a37 | |
parent | b8e9ce44e45e82f3971b224fc5e7a9beead87533 (diff) |
ups_ctl.sh prompt for password
-rwxr-xr-x | ups_ctl.sh | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1,28 +1,28 @@ #!/bin/sh /usr/bin/expect -c "spawn ssh localadmin@$1 expect \"password:\" -send \"99999999\r\" -expect \"localadmin> \" +send \"$3\r\" +expect \"*> \" send \"device\r\" -expect \"localadmin> device (VideoRack1)> \" +expect \"*)> \" send \"load 1\r\" -expect \"localadmin> device (VideoRack1)> load (1)> \" +expect \"*)> load (1)> \" send \"$2\r\" expect \"Are you sure? Type \\\"yes\\\" to proceed: \" send \"yes\r\" -expect \"localadmin> device (VideoRack1)> load (1)> \" +expect \"*)> load (1)> \" send \"exit\r\" -expect \"localadmin> device (VideoRack1)> \" +expect \"*)> \" send \"load 2\r\" -expect \"localadmin> device (VideoRack1)> load (2)> \" +expect \"*)> load (2)> \" send \"$2\r\" expect \"Are you sure? Type \\\"yes\\\" to proceed: \" send \"yes\r\" -expect \"localadmin> device (VideoRack1)> load (2)> \" +expect \"*)> load (2)> \" send \"exit\r\" -expect \"localadmin> device (VideoRack1)> \" +expect \"*)> \" send \"exit\r\" -expect \"localadmin> \" +expect \"*> \" send \"exit\r\" expect \"\0\" " |