Alexander E. Patrakov wrote these words on 01/02/06 09:52 CST:
> Randy McMurchy wrote:
>>And since we can determine exactly what we are dealing with, we
>>should be able to define rules to fit whatever it is that is
>>discovered? At least that's the way I see it. What am I missing?
>
> You are missing the fact that HAL writes the fstab line for a floppy
> before it has a chance to know the actual filesystem, because there is
> no floppy in the drive. And mount options good for vfat floppies (i.e.,
> iocharset=...) are bad for ext2 floppies (they don't need iocharset and
> treat it as a bad mount option).
Yes, of course. I was being stupid and forgetting that the fstab
entry for floppies and cdrom/dvds are created when the daemon is
started. Somehow, I was convinced that it occurred on changes in
the disk change line. Duh!
However, there may be a workaround I'd like you to explore. It
works for me using the read-only option mounting floppies, so
I believe it may work for passing the iocharset/codepage options
as well. Hopefully, the iocharset/codepage options aren't
something that must be in the /etc/fstab file. If not, I believe
this workaround should work.
Try this:
Add a policy rule similar to this:
<device>
<match key="storage.drive_type" string="floppy">
<!-- here is where another match key will be, matching
specific filesystems. Right now, in my testing, I
was only working on floppies. However, it is trivial
to pass a match key like this:
<match key="volume.partition.msdos_part_table_type"
int="FSTYPE_TO_MATCH"> -->
<merge key="volume.policy.mount_option.iocharset=iso8859-1"
type="bool">true</merge>
<!-- </match> -->
</match>
</device>
Let me know if it works. I'm thinking it will. 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.
As I said, it worked for me using a read-only option, the only
thing you'll do different is pass iocharset/codepage options.
--
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]
12:33:00 up 99 days, 21:57, 3 users, load average: 0.23, 0.13, 0.35
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page