home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 204.img / SC386BN1.TD0 / etc / fdswap < prev    next >
Encoding:
Text File  |  1988-12-10  |  667 b   |  56 lines

  1. :
  2. #    @(#) fdswap.sh 1.1 87/12/21 
  3. #
  4. #    Copyright (C) The Santa Cruz Operation, 1987.
  5. #    This Module contains Proprietary Information of
  6. #    The Santa Cruz Operation, Microsoft Corporation
  7. #    and AT&T, and should be treated as Confidential.
  8. #
  9. #
  10. # FDSWAP - swap floppy drives
  11. #
  12. PATH=/bin:/usr/bin:/etc
  13.  
  14. CMOSADDR=0x2c
  15.  
  16. usage() {
  17.     echo "Usage: fdswap [on|off]" >&2
  18.     exit 1
  19. }
  20.  
  21. case $# in
  22. 0)
  23.     set -- `cmos $CMOSADDR`
  24.     case $2 in
  25.     0)
  26.         VALUE=off
  27.         ;;
  28.     1)
  29.         VALUE=on
  30.         ;;
  31.     *)
  32.         VALUE=unknown
  33.         ;;
  34.     esac
  35.     echo "Floppy drive swap is $VALUE"
  36.     ;;
  37. 1)
  38.     case $1 in
  39.     on)
  40.         VALUE=1
  41.         ;;
  42.     off)
  43.         VALUE=0
  44.         ;;
  45.     *)
  46.         usage
  47.         ;;
  48.     esac
  49.     cmos $CMOSADDR $VALUE > /dev/null
  50.     ;;
  51. *)
  52.     usage
  53.     ;;
  54. esac
  55.  
  56.