[arch-general] Hacking into HAL's mount process

Rogutės Sparnuotos rogutes at googlemail.com
Sun Mar 14 19:12:14 CET 2010


fons at kokkinizita.net (2010-03-14 17:03):
> On Sun, Mar 14, 2010 at 08:58:45PM +0530, Nilesh Govindarajan wrote:
> 
> > On 03/14/2010 08:50 PM, fons at kokkinizita.net wrote:
> >
> > >Just put the device in /etc/fstab with whatever options
> > >you want, (u)mount it manually and forget about hal.
> > 
> > Doesn't do good. I have multiple pen drives :)
> 
> Same here, no problem. Label them, use the label
> to identify them in /etc/fstab, and have each of
> them mounted to its own fixed place.

In the spirit of getting away from HAL (and the topic):
- just put a custom udev rule under /etc/udev/rules.d/ (sample attached).

-- 
--  Rogutės Sparnuotos
-------------- next part --------------
# automount vfat on removable devices (/dev/sd? -> /media/sd?)
ACTION=="add", KERNEL=="sd[a-z][1-9]", ATTRS{removable}=="1", ENV{ID_FS_TYPE}=="vfat", GROUP="storage", RUN+="/bin/mkdir -p /media/%k", RUN+="/bin/mount -t vfat -o rw,noatime,gid=storage,dmask=002,fmask=002,utf8 /dev/%k /media/%k"
ACTION=="remove", KERNEL=="sd[a-z][1-9]", ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/umount /media/%k", RUN+="/bin/rmdir /media/%k"


More information about the arch-general mailing list