halevt-dev
[Top][All Lists]
Advanced

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

[Halevt-dev] Using halevt to replace ivman


From: Adrian Mariano
Subject: [Halevt-dev] Using halevt to replace ivman
Date: Fri, 3 Jul 2009 09:58:52 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

I'm trying to use halevt to replace ivman because ivman apparently
doesn't work with the latest hal version.  

I'm on Debian testing, and have installed the debian package version
of halevt.  I had to add an entry to /etc/PolicyKit/PolicyKit.conf to
enable mounting to work.  After doing this, I found that when I insert
a memory stick, it appears as /media/disk owned by root and with read only
permission (well, 775). 

Subsequently typing "halevt-umount /media/disk" has no effect.  (No
error message, no effect.)  Running that command as root unmounts the
device.  Am I now requird to run "halevt-mount -s"?  

A look in the halevt.xml config file reveals this 

<halevt:Device match="hal.block.device &amp; hal.block.is_volume = true &amp; 
(hal.volume.policy.should_mount = true | ((! hal.volume.policy.should_mount = 
false) &amp; (hal.block.storage_device.hal.storage.policy.should_mount = true | 
((! hal.block.storage_device.hal.storage.policy.should_mount = false)  &amp; 
(hal.block.storage_device.hal.storage.hotpluggable = true | 
hal.block.storage_device.hal.storage.removable = true)))))">
   <halevt:Insertion exec="halevt-mount -u $hal.udi$ -o sync -m 002"/>
</halevt:Device>


It would appear that the mode is not chosen appropriately in this
default configuration.  "-m 000" would seem to be the correct choice.  

I also notice that the sync option is given.  From the mount man page:

       sync   All I/O to the file system should be done synchronously. In case
              of  media  with  limited number of write cycles (e.g. some flash
              drives) "sync" may cause life-cycle shortening.

I'd rather not have life cycle shortening of my flash devices.  Is
this really a good default?  


A second observation is that if a device has an entry in the fstab
file then it appears to prevent that device from being mounted.  

With ivman, I had the following entry in my fstab file:

/dev/disk/by-id/usb-Sony_Card_R_W_-CF_50000007C7FA-0:0-part1  /media/flashcard  
 msdos   rw,user,noauto,dmask=0000,fmask=0111 0 0

and ivman (well, pmount, I guess) would use this entry when it mounted
the device.  With halevt, the device does not get mounted at all,
anywhere (that I can find) when I insert it.  If I comment out this
entry, *then* the device gets mounted as /media/disk.  Why do I get
this behavior?

How can I add control for particular devices with halevt?  I suppose I
can somehow detect this in the halevt.xml file.  Any examples of how
to do it?  What would I do to replace the above entry?  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]