On 18/06/2010 6:25, Toan wrote:
> On Wed, Jun 16, 2010 at 9:57 PM, Toan<nguyenthet...@gmail.com>  wrote:
>    
>> Hi everyone,
>>
>> I use halevt to mount (read-only) all my usb/SD Card/Cdrom (removable media)
>> automatically upon insert.
>>
>> Recently I bought an internal SATA dock where you can just hot swap
>> your harddrive.
>> The trouble is linux doesn't treat SATA drive as removable media. So I had to
>> login to my Freevo machine to mount/unmount them manually. Does anybody has
>> suggestions on how to mount SATA harddrive automatically upon insert ?
>>      
> I found the solution within halevt. I add the following lines to
> /etc/halevt/halevt.xml (the default location on ubuntu 10.04):
>
> <halevt:Device match="hal.block.device&amp; hal.volume.uuid =
> D8C6300BC62FE908 ">
>      <halevt:Insertion exec="sudo halevt-mount -u $hal.udi$ -o ro -m 222"/>
> </halevt:Device>
> <halevt:Device match="hal.block.device&amp; hal.volume.uuid =
> D8C6300BC62FE908 ">
>      <halevt:OnInit exec="sudo halevt-mount -u $hal.udi$ -o ro -m 222"/>
> </halevt:Device>
>
>
> Now the SATA harddrive will be mounted read-only automatically when
> it's inserted. Of course
> you need to modify /etc/sudoers to let halevt-mount sudo without password:
>
> halevt ALL=NOPASSWD:/usr/bin/halevt-mount
I hate to sound repetitive but it would be nice to have this in the wiki :)

John

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to