[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: devfs -> udev, user mounting etc



On Thu, Sep 16, 2004 at 09:05:56AM +0200, Chris wrote:
> 
> Dave - you said you were using autofs to mount some of your devices?
> You haven't got an example config file you could send?
> 
Recall my /etc/udev/rules.d/local.rules:

BUS="usb", SYSFS{product}="JUMPDRIVE", NAME="%k", symlink="jumpdrive"
BUS="usb", SYSFS{product}="JUMPDRIVE PRO", NAME="%k", symlink="jumpdrive_pro"
BUS="usb", SYSFS{product}="JumpDrive Trio", NAME="%k", symlink="jumpdrive_trio"
BUS="usb", SYSFS{product}="USB SmartMedia", NAME="%k", symlink="smartmedia"
BUS="usb", SYSFS{product}="ARCHOS USB2.0 (P4a)",NAME="%k", symlink="jukebox"
BUS="usb", SYSFS{product}="C2Z,D520Z,C220Z", NAME="%k", symlink="camera"
BUS="usb", SYSFS{product}="Palm Handheld", NAME="%k", symlink="pilot"

Here's the contents of /etc/auto.misc (beware of long lines):

cdrom		-fstype=iso9660,ro,sync,nodev,nosuid,gid=cdrom	:/dev/cdroms/cdrom1
floppy		-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113	:/dev/floppy/0
jumpdrive	-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113	:/dev/jumpdrive
jumpdrive_pro	-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113	:/dev/jumpdrive_pro
jumpdrive_trio	-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113 	:/dev/jumpdrive_trio
smartmedia	-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113 	:/dev/smartmedia
jukebox		-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113 	:/dev/jukebox
camera		-fstype=auto,sync,nodev,nosuid,gid=floppy,dmask=002,fmask=113 	:/dev/camera

I figure that using removable usb media is morally equivalent to using a
floppy, so I just mount them as gid floppy. 

I have symlinks in /etc/media for all of these devices:

/media/camera -> /var/autofs/misc/camera
/media/cdrom -> /var/autofs/misc/cdrom
/media/floppy -> /var/autofs/misc/floppy
/media/jukebox -> /var/autofs/misc/jukebox
/media/jumpdrive -> /var/autofs/misc/jumpdrive
/media/jumpdrive_pro -> /var/autofs/misc/jumpdrive_pro
/media/jumpdrive_trio -> /var/autofs/misc/jumpdrive_trio
/media/smartmedia -> /var/autofs/misc/smartmedia

I shortened the timeout in /etc/default/ to 2 seconds from 300, this may be
a bit too short but it hasn't caused problems yet.

I don't use KDE or Gnome, so for a visual indication of mounts I setup the
gkrellm file system krell for each of these mountpoints with the 'show if
mounted' checkbox ticked.

HTH

dt

-- 
Dave Thayer           | WARNING: Persons denying the existence of 
Denver, Colorado USA  | robots may be robots themselves.
dave@thayer-boyle.com | 



Reply to: