Mounts with fstab entries should succeed if mount points are identical

Frank Steiner fsteiner-mail1 at bio.ifi.lmu.de
Mon Jul 13 07:14:05 PDT 2009


Hi,

after switching from SuSE Linux Enterprise 10 (hal 0.5.6) to 11 (hal 0.5.12)
we see that halmount (from ivman) refuses to mount entries for which a
fstab entry exists. I guess due to patches like Ludwigs in 
http://lists.freedesktop.org/archives/hal-commit/2006-February/002171.html

However, in 0.5.6 the behaviour was more clever: hal (or only halmounty?)
refused to mount a device on a mount point *different* from the one listed 
in fstab. I.e., if I had

/dev/sr1    /media/cdrecorder     auto     noauto,users,user     0 0     

in my fstab, "halmount /dev/sr1 cdrecorder" succeeded, while
"halmount /dev/sr1 blabla" failed, saying that this configuration was
denied by the fstab. This makes much more sense and allowed to have fixed 
mountpoints with ivman:

With the fstab line above and a ivman config
    <ivm:Match name="hal.block.device" value="/dev/sr1">
    <ivm:Option name="mount" value="true" />
    <ivm:Option name="exec" value="halmount $hal.block.device$ cdrecorder" />
    </ivm:Match>

every CD/DVD inserted in /dev/sr1 would always be mounted at
/media/cdrecorder. The additional mount at /media/<LABEL> that
ivman tries by default was prevented because the mountpoint
differed from the one in fstab.

This config allowed fixed mountpoints in a multi-desktop environment
by starting ivman always, even for Gnome and KDE, and was good for
users without KDE/Gnome who work with the command line a lot.

Another reason why this fstab line was neccessary is the use of e.g.
dvd+rw-tools. growisofs cannot umount a DVD mounted by ivman when
running as user, if there is no fstab line. Thus, with ivman (and also
without when using Gnome/KDE) growisofs could no longer be used without
root-permissions.

Now with the change that hal refuses to mount a device whenever it
finds an fstab entry, even when the mount point is the same, this
solution does no longer work. I.e., we cannot have fixed mount points
anymore without having an additional mount at /media/<LABEL>, and
tools like growisofs can no longer be used.

Is there a chance to make hal consider at which mount point the user
wants to mount a device (by "halmount" or other tools), and succeed if 
this mount point and the one in the fstab are the same?

You can read about the solution for fixed mount points (that was
developed together with the Novell/SuSE Linux Support in 2007)
at http://www.mail-archive.com/opensuse@opensuse.org/msg51854.html
This solution no longer works due to the change in hal.

cu,
Frank

-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


More information about the hal mailing list