You are not logged in.

#1 2007-06-09 12:19:21

zarathustra
Member
Registered: 2007-06-06
Posts: 3

How to set a mount option with hal.

Situation: I have an external harddisk with an ntfs-partition on it. I want to be able to mount it with ntfs-3g for write support especially when the "volume is scheduled for check".

$ > mount -t ntfs-3g /dev/sdc1 /mnt/temp
Volume is scheduled for check. Please boot into Windows TWICE, or
use the 'force' mount option. For example type on the command line:
            mount -t ntfs-3g /dev/sdc1 temp -o force
    Or add the option to the relevant row in the /etc/fstab file:
            /dev/sdc1 temp ntfs-3g defaults,force 0 0

I can mount it using "mount -t ntfs-3g -o force ...". Now I want to enable this option for devices managed by HAL. I tried setting various properties in the hal config file:

/etc/hal/fdi/policy/90-user-methods.fdi:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
        <device>
                <match key="volume.fsusage" string="filesystem">
                <match key="volume.fstype" string="ntfs">
                        <append key="volume.mount.additional_options" type="strlist">force</append>
                        <append key="volume.mount.valid_options" type="strlist">force</append>
                        <append key="volume.mount.extra_options" type="strlist">force</append>
                        <merge key="volume.policy.mount_option.force" type="bool">true</merge>
                        <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
                </match>
                </match>
        </device>
</deviceinfo>

None of the changed keys have any effect. Mounting fails with the same message as when omitting the "-o force" option.  How do i make HAL use the "force"-option for mounting devices.

Last edited by zarathustra (2007-06-12 13:35:42)

Offline

Board footer

Powered by FluxBB