home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- ###############################################################################
- ### ###
- ### GNU Interactive Tools 4.3.11 auto-mount script ###
- ### Copyright (C) 1994, 1996 Free Software Foundation, Inc. ###
- ### Written by Tudor Hulubei and Andrei Pitis. ###
- ### ###
- ###############################################################################
-
- ###
- ### This script is for Linux only.
- ### The ideea of this script is quite general but the script needs
- ### some changes in order to run on other UNIX systems.
- ### The major change is in the file system types list.
- ###
- ### If you enhance this script, please send me a patch at tudorh@pub.ro.
- ### I'll include it in the next release.
- ###
-
- name=`basename "$0"`
-
- if test "$#" != 1; then
- echo usage: $name device " (ex: " $name fd0 ")"
- exit 1
- fi
-
- for fstype in ext2 msdos minix ext xiafs hpfs iso9660 nfs sysv
- do
- echo checking for $fstype file system ...
- mount -t $fstype /dev/"$1" /mnt/"$1" > /dev/null 2> /dev/null
- ok=$?
- if test $ok = 0; then
- echo $fstype file system succesfully mounted
- exit 0
- fi
- done
-
- echo "$0: permission denied or mount error" >&2
- exit 1
-