Nelson, David (ED, PAR&D) wrote:
-----Original Message-----
From: James Lockie [mailto:[EMAIL PROTECTED]
Sent: 04 January 2007 05:28
To: Gentoo User Mailing List
Subject: [gentoo-user] external USB harddrive


Does anyone have one of these? :-)
It mounts when I connect it but a user can't unmount it.
My USB memory stick and USB card reader work fine.
It is only the hard drive that I can't unmount as a user.
I don't have or want an /etc/fstab entry for it, I should be able to configure KDE to handle it.

--
gentoo-user@gentoo.org mailing list


I would add it to fstab (I reckon this would be the easiest way) - the same 
fstab entry should work for USB memory sticks/card readers as well, to my 
knowledge.

Or if you wanted to get really fancy I believe you could write a udev rule so 
it recognises that device and assigns it /dev/externalhdd or the like :)

David
Note: These views are my own, advice is provided with no guarantee of success. 
I do not represent anyone else in any emails I send to this list.

I tried creating 10-my-udev.rules
# http://wiki.archlinux.org/index.php/Udev
KERNEL=="sd[c-z]", NAME="%k", SYMLINK+="usbhd-%k", GROUP="users", OPTIONS="last_
rule"
ACTION=="add", KERNEL=="sd[c-z][0-9]", SYMLINK+="usbhd-%k", GROUP="users", NAME=
"%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/ln -s /media/usbhd-%k /mnt/usb
hd-%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT =="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,sync,dirsync,noexec,nodev,noatim
e,dmask=000,fmask=111 /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,syn
c,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k" ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPT
IONS="last_rule"
but then KDE doesn't see the new drive.

--
gentoo-user@gentoo.org mailing list

Reply via email to