Re: Hacking into HAL's mount process

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



fons@xxxxxxxxxxxxxxx (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@xxxxxxxxxxxxxxx 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
# 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"

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux