Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # get r1soft username
- r1user=$(dialog --inputbox "Enter R1Soft administrative username" 20 60 2>&1 >/dev/tty)
- # get r1soft password
- r1pass=$(dialog --inputbox "Enter password for $r1user" 20 60 2>&1 >/dev/tty)
- # grab the volume names into an array
- counter=0
- for volume in $(r1volume --buserver-hostname="$r1bs" --buserver-username="$r1admin" --buserver-password="$r1pass" LIST | awk '{print $1,$5}' | grep -v NAME); do
- volarray[$counter]="$volume"
- counter=$(( $counter + 1 ))
- done
- # I put in the 'exit' below because r1volume says "bad username / password" here.
- exit 1;
- # dialog for selecting volume to use
- r1vol=$(dialog --menu "Select volume on $r1bs" 40 60 35 $(echo "${volarray[*]}") 2>&1 >/dev/tty)
- echo "menu choice $r1vol"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement