Thoughts about HAL, Ivman and Pmount.

Jonatan Liljedahl lijon at kymatica.com
Wed Oct 26 16:31:17 PDT 2005


Hi! I'm thinking about the best setup of "desktop friendly" device
handling, and would like some comments...

IMHO, automounting should be done by system (hald or ivman running as
root), since if two users are running ivman at the same time there will
be big trouble when both tries to mount the same thing under /media.
There will be a war about who owns the mountpoint.

But if the device is mounted by root ivman, trough pmount, then only
root will be able to unmount it.
Therefore I have made a patch for pmount that lets any user who's in the
same group as specified by the gid= mount option unmount a device:
http://kymatica.com/stuff/pmount-0.9.3-lijon.patch

Is it best to let hald or root ivman do the automounting? It seems like
ivman doesn't pass all the mount options to pmount, and there's also
some problems regarding matching in IvmConfigActions.xml: root ivman
waits 5 seconds before mounting to let user ivmans do the mount first
(why??) which means that if you match "ivm.mountable" in
~/.ivman/IvmConfigActions.xml then $hal.volume.mount_point$ will not be
set yet, since the device isn't mounted. Matching
$hal.volume.is_mounted$ in IvmConfigProperties.xml seems to have some
problems if you want do to different stuff for different types of
devices, etc... The syntax of ivmans config files is kind of limited in
many ways, while .fdi files seems to be very flexible.

How would I set up hald to do the automounting, running pmount (or
pmount-hal?) with specific GID?

Another way would be no automounting at all, but only create mountpoints
in /media. But this requires telling the desktops that these are
mountpoints, which means either using fstab-sync (bad) or some specific
media handling in the desktop software. For example, I'm running ROX
[http://rox.sf.net] and it does not know that everything in /media is
mountpoints, etc... (maybe such a patch would be good)

Regards,
/Jonatan    -=( http://kymatica.com )=-


More information about the hal mailing list