Randy McMurchy wrote:
Randy McMurchy wrote these words on 01/01/06 15:24 CST:


And here is the created file:


There were mistakes in this file, and my first commit. The backslashes
in the file are no good. The updated lines are shown below, and how
the proper commit is.

      <match key="info.udi"
             string="/org/freedesktop/Hal/devices/computer">

        <!-- Set the iocharset variable in the /etc/fstab file entry -->
        <merge
          key="storage.policy.default.mount_option.iocharset=[iocharset]"
          type="bool">true</merge>

        <!-- Set the codepage variable in the /etc/fstab file entry -->
        <merge
          key="storage.policy.default.mount_option.codepage=[codepage]"
          type="bool">true</merge>

Unfortunately, setting codepage on CD-ROMS breaks things (codepage=... is not a valid mount option for iso9660). Sorry for providing a half-broken example in the first place. Attached is a known-good version for ru_RU.UTF-8. Codepage is set only for vfat. In fact, if it is OK to break DOS compatibility and stay compatible only with MS Windows >= 98SE, codepage is not needed at all.

Just for the record, I would like this file to have all the data
on just one line each. I don't really care for the way it is split
into sections. This, unfortunately, cannot be avoided though, if we
want to display everything on a PDF formatted page. Lines longer
than 71 characters won't fit, so they must be split up.

Since the file is quite long, it may be better to replace "utf8" with IOCHARSET and "866" with CODEPAGE in the attached file, put this file somewhere on the web, and tell users to download and sed it. For Randy (if he wants to try this anyway with options set to kernel defaults), this means:

sed -e s/IOCHARSET/iso8859-1/ -e s/CODEPAGE/437/ \
  storage-policy.fdi.example \
  >/etc/hal/fdi/policy/30user/10-storage-policy.fdi


--
Alexander E. Patrakov
Don't mail to [EMAIL PROTECTED]: the server is off until 2006-01-11
Use my GMail or linuxfromscratch address instead
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 

<deviceinfo version="0.2">

  <device>
    <!-- Add iocharset and codepage to device types that may need them
         and for which the filesystem type cannot be known in advance.
         WARNING: this breaks mounting ext2-formatted floppies,
	 but it is impossible to have correct flags both for media
	 that doesn't need iocharset and for media that does.
	 Remove all matches except for cdrom if you prefer filenames
	 like ???????.txt on VFAT floppies to unmountable ext2 floppies. -->

    <match key="storage.drive_type" string="cdrom">
      <merge key="storage.policy.mount_option.iocharset=utf8" type="bool">true</merge>
    </match>
    <match key="storage.drive_type" string="floppy">
      <merge key="storage.policy.mount_option.iocharset=utf8" type="bool">true</merge>
      <merge key="volume.policy.mount_option.codepage=866" type="bool">true</merge>
    </match>
    <match key="storage.drive_type" string="zip">
      <merge key="storage.policy.mount_option.iocharset=utf8" type="bool">true</merge>
      <merge key="volume.policy.mount_option.codepage=866" type="bool">true</merge>
    </match>
    <match key="storage.drive_type" string="jaz">
      <merge key="storage.policy.mount_option.iocharset=utf8" type="bool">true</merge>
      <merge key="volume.policy.mount_option.codepage=866" type="bool">true</merge>
    </match>
    
    <!-- Add iocharset and codepage to filesystems that certainly need it -->
    <match key="volume.fstype" string="vfat">
      <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge>
      <merge key="volume.policy.mount_option.codepage=866" type="bool">true</merge>
    </match>
    <match key="volume.fstype" string="ntfs">
      <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge>
    </match>
  </device>
  
</deviceinfo>
-- 
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