Bugzilla – Bug 149035
hal only supports boolean mount_option type, cannot set e.g. umask/user/group mount options
Last modified: 2006-02-09 15:52:17 UTC
Shouldn't storage.policy.default.mount_option.* have type string? Right now, only boolean options like sync or ro can be set, right? With string, any options of mount(8) like user, group, umask etc could be set, e.g.: <merge key="storage.policy.mount_option.user" type="string">foobar</merge> <merge key="storage.policy.mount_option.umask" type="string">0700</merge> Or is this already possible with the current boolean implementation?
Wrong mount options, please s/user/uid/g; s/group/gid/g Thanks.
And, just before someone mentions: The umask value is nuts too, I know...
take a look at the spec: <merge key="storage.policy.mount_option.user=foobar" type="bool">true</merge> <merge key="storage.policy.mount_option.umask=0700" type="bool">true</merge>
I'm sorry, but it's definitely not that easy! Please note that I've read the spec and searched the hal mailing-list at freedesktop.org. Although, your solution above is suggested at some places, there are also posts that it doesn't work, just as for me. Now for some details: With SuSE 10.0 (with hal-0.5.4-6.4): Created a file /usr/share/hal/fdi/policy/95userpolicy/usbstick.fdi What is working (and to show I have at least some clues about what I'm doing ;-): Disable mounting of floppy-partition of usbstick (would be /dev/sdb): <match key="volume.uuid" string="8C0A-11E1"> <merge key="volume.policy.should_mount" type="bool">false</merge> </match> Or, setting the following _known_ options without parameters works too: <match key="volume.uuid" string="AEBE-5B5A"> <!-- disk partition (dev/sda1) --> <merge key="volume.policy.desired_mount_point" type="string">stick1</merge> <merge key="volume.policy.mount_option.sync" type="bool">false</merge> </match> Indeed, entries in syslog show that the usbstick is mount _without_ sync: hal-subfs-mount[32487]: Collected mount options and Called(0) /bin/mount -t subfs -o fs=floppyfss,procuid,nosuid,nodev,exec,utf8=true /dev/sda1 "/media/stick1" However, the following merge keys are ignored (it's a vfat partition): <merge key="volume.policy.mount_option.uid=501" type="bool">true</merge> <merge key="volume.policy.mount_option.umask=0077" type="bool">true</merge> The mount_options never show in hal-subfs-mount syslog messages, therefore I suspect they're not passed to it at all, right? Also, I cannot specify a different mount_root as, e.g. <merge key="storage.policy.default.mount_root" type="string">/usbdev</merge> is ignored unless directly changed in 10osvendor/10-storage-policy.fdi. Perhaps, hal-0.5.4 has a bug and it simply doesn't work. If I'm told to upgrade to latest hal or set some configure options and recompile from the Source-RPM, it's all ok with me. However, just looking at the spec doesn't solve the problem. :-( Btw, regarding the spec: storage.policy.default.mount_option.* shows .fscontext=system_u:object_r:removable_t as an example and nothing more. Is the format documented somewhere in more detail? Regards, Walter
I close this bug again, because we don't use this keys for automount. We use currently only a couple of defined keys and ignore all other. The submount helper for hal is only designed for default mount and not really for customize. Btw. This helper is no longer under development, because we dropped subfs.
Ok, I see. What will be the replacement for subfs?
No need to answer - Google is your fried: Found your Blog entry: http://dkukawka.blogspot.com/2006/02/subfs-dropped-and-now.html And, btw, I'm one of the "no desktop" users you're regarding to. No Gnome, KDE or even xfce. Just console and IceWM.
Here is the announcement from the mailing list: [opensuse-factory] subfs dropped in 10.1 Beta 2 http://lists.opensuse.org/archive/opensuse-factory/2006-Jan/0116.html Regarding this very bug report , the following (see: 2) Mount options.) says it all: http://lists.opensuse.org/archive/opensuse-factory/2006-Jan/0123.html