#ident "@(#)/usr/local/sysadmin/TAPEMGR 1.0 03/14/91" Author: Mr Reinhard Pfaffinger
# Office: 1924 CSS/SDA, Randolph AFB, Texas 78150
# Phone: AV 487-8649  Comm: (512) 652-8649
#
# This script allows a system administrator to retension and/or erase SCSI QIC
# tapes.
#

chkfortty() {
             if [ "$TERM" = "tty" ]
               then
                   echo  
             else
                 tput clear 
             fi
            }

while :
 do
   chkfortty
   echo "                    <<< AT&T 3B2/600G SCSI Tape Management Menu >>>\n"
   echo "                        1. Retension SCSI QIC Tape"
   echo "                        2. Erase SCSI QIC Tape"
   echo "                        3. Retension/Erase SCSI QIC Tape\n"
   echo "                        q or Q to quit\n"
   echo "                        Enter response <RETURN> =>> \c"
   read RESP
   case "$RESP" in
      1)
        chkfortty
        /usr/local/tape.util -r 
        echo "\nPress <RETURN> ... \c"
        read RTN
        continue
        ;;
      2)
        chkfortty
        /usr/local/tape.util -ec 
        echo "\nPress <RETURN> ... \c"
        read RTN
        continue
        ;;
      3)
        chkfortty
        /usr/local/tape.util
        echo "\nPress <RETURN> ... \c"
        read RTN
        continue
        ;;
    q|Q)
        exit 0
        ;;
      *)
        echo "\n\t\t\t\tInvalid response!\c"
        sleep 2
        continue
        ;;
   esac
 done
