#ident "@(#)/usr/local/sysadmin/SYSDIAG 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 receive information on hard disk
# error/failure correction procedures.
#

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

while :
 do
   chkfortty
   echo "                    <<< AT&T 3B2/600G System Diagnostics Menu >>>\n"
   echo "                        1. Disk Repair Procedures"
   echo "                        2. Disk Error Reports\n"
   echo "                        q or Q to quit\n"
   echo "                        Enter response <RETURN> =>> \c"
   read RESP
   case "$RESP" in
      1)
        chkfortty
        sysadm diskrepair 
        echo "\nPress <RETURN> ... \c"
        read RTN
        continue
        ;;
      2)
        chkfortty
        sysadm diskreport 
        echo "\nPress <RETURN> ... \c"
        read RTN
        continue
        ;;
    q|Q)
        exit 0
        ;;
      *)
        echo "\n\t\t\t\tInvalid response!\c"
        sleep 2
        continue
        ;;
   esac
 done
