[PATCH] string options in *.policy.mount_option

David Zeuthen david at fubar.dk
Thu Sep 1 13:54:20 PDT 2005


Hi,

Sorry for the lag,

On Wed, 2005-08-31 at 00:07 +0200, Juergen Orschiedt wrote:
> A month ago, rider at altlinux.com sent a patch against libhal-storage.c
> which would allow the usage of string options in mount_options.
> I added a missing "else", because it generated empty fields when a
> boolen value was reset by the policy.
> 
> So now you can create mount_options like
> 
> <deviceinfo version="0.2">
>     <device>
>         <match key="volume.policy.should_mount" bool="true">
>             <merge key="volume.policy.mount_option.pamconsole"
> type="bool">false</merge>
>             <merge key="volume.policy.mount_option.gid"
> type="string">users</merge>
>             <merge key="volume.policy.mount_option.noauto"
> type="bool">false</merge>
>             <merge key="volume.policy.mount_option.umask"
> type="string">0002</merge>
>         </match>
>    </device>
> </deviceinfo>
> 
> Attached you'll find the patch against hal-0.5.4cvs

So, two things

 1. You can do this already, for example

    <merge key="volume.policy.mount_option.umask=0002" type="bool">true</merge>

    should do the trick.

    See the spec for details: http://cvs.freedesktop.org/*checkout*/hal/hal/doc/spec/hal-spec.html#device-properties-storage-policy-default

 2. The storage.policy* and volume.policy* is about to be deprecated
    in favor of using mount programs that reads settings from the users
    desktop session.

Hope this helps,
David




More information about the hal mailing list