2 # Filename: automount.sh
3 # Purpose: generate an automounter entry automatically for automount /mnt/auto program this_script
4 # Authors: (c) Klaus Knopper 2002, (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 # Latest change: Don Okt 28 16:19:40 CEST 2004 [mika]
8 ################################################################################
10 # WARNING: This script is used for removable media in grml,
11 # therefore the mount is always read-write (except for cdroms
16 device="/dev/${1##*/}"
18 floppy) [ -s /etc/sysconfig/floppy ] || exit 1; device="/dev/fd0";;
23 # Uses external fstype script from grml-scanpartitions
24 fs="$(fstype "$device")"
26 [ "$?" = "0" ] || exit 1
29 *fat|msdos) options="${rw},uid=grml,gid=grml,umask=000";;
30 ntfs) options="ro,uid=grml,gid=grml,umask=0222";;
31 iso9660) options="ro";;
35 MNTLINE="-fstype=$fs,users,exec,$options :$device"
37 # Return line to the automounter
40 ## END OF FILE #################################################################