Hi Perry,

On Wed, 22 Sep 2004, Perry, David wrote:

> 
> I'm trying to automatically mount a usbkey on Redhat 9 when it is plugged in and 
> then unmount it after it stops being accessed.  I wish it to be available to all 
> users not just root.  This recipe came from 
> www.systemsaligned.com/learn/howto/hwtusbkey In theory the usbkey is suppossed to 
> mount as soon as it is accessed and unmount one second afer the access ceases.
> 
> I created a directory /mnt/removable
> 
> a file /etc/auto.removable which contains
> usbkey -fstype=vfat,umask=000 :/dev/sda

My problem with this method is that it assumes that
the device will always be loaded on to sda, which is
not the case if you have many pluggable devices, like
scanners, other usb sticks, digital cameras. The best
solution would be to look at hotplug and udev, which
as someone mentioned Ubantu does but any distro can
be setup to handle hotplug. See:
http://linux-hotplug.sourceforge.net/

Also look at udev, which allows you to set rules
for each device that is plugged in to the system.
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ

> 
> a file /etc/auto.master which contains
> /mnt/removable /etc/auto.removable --timeout=1
> 
> restarted autofs
> 
> This is not mounting the usbkey when I try #ls /mnt/removable
> 
> The key works perfectly when I manually mount it with #mount -t vfat /dev/sda1 
> /mnt/removable
> 
> Any advice?  The instructions say to use sda not sda1 in the auto.removable file and 
> I have tried sda1 with no success. 
> 
> Thanks in advance
> David
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
--------------------------------------------------
Darren Williams <dsw AT gelato.unsw.edu.au>
[EMAIL PROTECTED] <www.gelato.unsw.edu.au>
--------------------------------------------------
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to