Petr Klíma napsal(a):
Hi, is there anybody understanding HAL? I use CentOS 4 (RHEL 4) I need set specific mount options for USB flash disk. I found I can do it in /usr/share/hal/fdi/95userpolicy/storage-policy.fdi
I found that correct syntax is this, but it still does not work.
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="block.is_volume" bool="true"> <match key="volume.fsusage" string="filesystem"> <match key="volume.fstype" string="vfat"> <merge key="volume.policy.mount_option.uid=nobody" type="string">true</merge> <merge key="volume.policy.mount_option.gid=mounter" type="string">true</merge> <merge key="volume.policy.mount_option.umask=077" type="string">true</merge> <merge key="volume.policy.mount_option.codepage=852" type="string">true</merge> <merge key="volume.policy.mount_option.iocharset=utf8" type="string">true</merge> <merge key="volume.policy.mount_option.exec" type="string">true</merge> </match> </match> </match> </device> </deviceinfo>
"lshal" is showing this, but disc is mounted with standard options...
uudi = '/org/freedesktop/Hal/devices/block_4223-CC71' volume.policy.mount_option.exec = 'true' (string) volume.policy.mount_option.iocharset = 'utf8' (string) volume.policy.mount_option.codepage = '852' (string) volume.policy.mount_option.umask = '077' (string) volume.policy.mount_option.gid = 'mounter' (string) volume.policy.mount_option.uid = 'nobody' (string) volume.policy.mount_option.noatime = true (bool) volume.policy.mount_option.sync = true (bool) volume.policy.desired_mount_point = 'usbdisk' (string) volume.policy.mount_filesystem = 'vfat' (string) volume.policy.should_mount = true (bool) info.udi = '/org/freedesktop/Hal/devices/block_4223-CC71' (string) volume.size = 130023424 (0x7c00000) (uint64) volume.block_size = 512 (0x200) (int) volume.num_blocks = 253952 (0x3e000) (int) volume.is_disc = false (bool) volume.is_mounted = true (bool) volume.mount_point = '/media/usbdisk' (string) volume.label = '' (string) volume.uuid = '4223-CC71' (string) volume.fsversion = 'FAT12' (string) volume.fsusage = 'filesystem' (string) volume.fstype = 'vfat' (string) info.product = 'Volume (vfat)' (string) info.parent = '/org/freedesktop/Hal/devices/block_8_16' (string) info.category = 'volume' (string) info.capabilities = 'block volume' (string) info.bus = 'block' (string) block.no_partitions = false (bool) block.have_scanned = false (bool) block.is_volume = true (bool) block.device = '/dev/sdb' (string) block.major = 8 (0x8) (int) block.minor = 16 (0x10) (int) block.storage_device = '/org/freedesktop/Hal/devices/block_8_16' (string)
what is wrong?