Randy McMurchy wrote these words on 01/02/06 12:53 CST:

> Executive summary is as follows:
> 
> We create policy rules with match keys looking for specific
> filesystem types and pass the *volume.policy.mount_option* key
> containing the desired iocharset/codepage options. This has
> the affect of *adding* additional options to the mount command
> to what is already specified in /etc/fstab.

Okay, a bit more testing on my end and I'm fully confident this
is going to work. So here is a revised file we create and put
in the book (of course, this is only for locales that actually
need it):


<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<!--
This file is used to set custom options to the HAL policy settings.
The default policy settings are defined in files contained in the
/usr/share/hal/fdi/policy directories. User defined customizations
should be in files contained in the /etc/hal/fdi/policy directories.
-->

<deviceinfo version="0.2">

  <device>
    <!-- Sets the proper '-o iocharset=[CHARSET]' mount option for
         filesystems (volumes) on pluggable devices. This rule will
         apply to the entry created in the /etc/fstab file for the
         device type. You must substitute your desired 'iocharset'
         value for [CHARSET]. -->

    <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
      <merge 
key="storage.policy.default.mount_option.iocharset=[CHARSET]"type="bool">true</merge>
    </match>
  </device>

  <device>
    <!-- Sets the proper '-o codepage=[CODEPAGE] mount option for
         filesystems (volumes) on pluggable devices. This rule is
         not added to the default entries in the /etc/fstab file.
         Instead, it is added when the filesystem (volume) is
         mounted. -->

    <match key="volume.partition.msdos_part_table_type" int="FSTYPE_TO_MATCH">
      <merge key="volume.policy.mount_option.codepage=[CODEPAGE]" 
type="bool">true</merge>
    </match>
  </device>

</deviceinfo>


If there is more than one filesystem type that needs the CODEPAGE
stuff passed, of course, we'd need more match key definitions.

Alexander, I'd like to know your thoughts.

-- 
Randy

rmlscsi: [GNU ld version 2.15.94.0.2 20041220] [gcc (GCC) 3.4.3]
[GNU C Library stable release version 2.3.4] [Linux 2.6.10 i686]
19:29:00 up 100 days, 4:53, 3 users, load average: 0.10, 0.28, 0.48
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to