: "
   12/01/82

   FILE:  initfd

   This shell is used to format single or double sided floppies on line.
   It calls the ALTOS 'format' utility.

"
: "                     trap and abort format on XENIX signals
                            1  hangup
                            2  interrupt
                            3  quit
                            15 software terminate
"

trap '
echo -n "Format aborted.
exit ' 1 2 3 15

while true
do
echo -n "
FORMAT FLOPPY DISK
  1.  Format single-sided diskette
  2.  Format double-sided diskette
  3.  Exit format utility
ENTER SELECTION: "

read ENTRY

case $ENTRY in

1)  
echo -n "
Insert single-sided disk,  then press  NEW LINE  or  RETURN. "
read ENTRY
echo "Formatting in progress."
:                             call ALTOS format utility
format >/dev/null <<!
24
!
echo "Formatting complete."
continue ;;

2)
echo -n "
Insert double-sided disk, then press  NEW LINE  or  RETURN. "
read ENTRY
echo "Formatting in progress."
:                                call ALTOS format utility
format >/dev/null <<!
34
!
echo "Formatting complete."
continue ;;

3)  
exit ;;

*)
echo Please enter number from list.

esac
done
