home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / git-4.3 / git-4 / git-4.3.11 / src / gitmount < prev    next >
Encoding:
Text File  |  1996-06-06  |  1.3 KB  |  41 lines

  1. #!/bin/sh
  2.  
  3. ###############################################################################
  4. ###                                                                         ###
  5. ###               GNU Interactive Tools 4.3.11 auto-mount script            ###
  6. ###             Copyright (C) 1994, 1996 Free Software Foundation, Inc.     ###
  7. ###                 Written by Tudor Hulubei and Andrei Pitis.              ###
  8. ###                                                                         ###
  9. ###############################################################################
  10.  
  11. ###
  12. ### This script is for Linux only.
  13. ### The ideea of this script is quite general but the script needs
  14. ### some changes in order to run on other UNIX systems.
  15. ### The major change is in the file system types list.
  16. ###
  17. ### If you enhance this script, please send me a patch at tudorh@pub.ro.
  18. ### I'll include it in the next release.
  19. ###
  20.  
  21. name=`basename "$0"`
  22.  
  23. if test "$#" != 1; then
  24.     echo usage: $name device  "    (ex:  " $name fd0 ")"
  25.     exit 1
  26. fi
  27.  
  28. for fstype in ext2 msdos minix ext xiafs hpfs iso9660 nfs sysv
  29. do
  30.     echo checking for $fstype file system ...
  31.     mount -t $fstype /dev/"$1" /mnt/"$1" > /dev/null 2> /dev/null
  32.     ok=$?
  33.     if test $ok = 0; then
  34.         echo $fstype file system succesfully mounted
  35.         exit 0
  36.     fi
  37. done
  38.  
  39. echo "$0: permission denied or mount error" >&2
  40. exit 1
  41.