Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. # get r1soft username
  2. r1user=$(dialog --inputbox "Enter R1Soft administrative username" 20 60 2>&1 >/dev/tty)
  3.  
  4. # get r1soft password
  5. r1pass=$(dialog --inputbox "Enter password for $r1user" 20 60 2>&1 >/dev/tty)
  6.  
  7. # grab the volume names into an array
  8. counter=0
  9. for volume in $(r1volume --buserver-hostname="$r1bs" --buserver-username="$r1admin" --buserver-password="$r1pass" LIST | awk '{print $1,$5}' | grep -v NAME); do
  10.         volarray[$counter]="$volume"
  11.         counter=$(( $counter + 1 ))
  12. done
  13.  
  14. # I put in the 'exit' below because r1volume says "bad username / password" here.
  15. exit 1;
  16.  
  17. # dialog for selecting volume to use
  18. r1vol=$(dialog --menu "Select volume on $r1bs" 40 60 35 $(echo "${volarray[*]}") 2>&1 >/dev/tty)
  19.  
  20. echo "menu choice $r1vol"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement