[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: /media directory



On Fri, 2004-11-05 at 14:42 -0500, Jeff Spaleta wrote:
> On Fri, 05 Nov 2004 12:10:14 -0600, James W. Bennett
> <silverhead comcast net> wrote:
> > Does anyone know for FC3,  can you set your own devices names in the
> > /media/ directory. If this has been discussed before, I am sorry I
> > missed it.
> > I have three cdroms, two being scsi dvd devices. I don't like them being
> > named "cdrecorder, cdrecorder1 and cdrecorder2  I would  much prefer
> > cdrom,  cdrom1  and cdrom2.
> > Any help is appreciated.
> 
> There is a way to create local hal policy to redefine mountpoints as
> well as other aspects of hal. But its going to have a steep-ish
> learning curve and I don't know of a good howto for hal yet that would
> have simple instructive examples.
> 

Hmm... /etc/fstab references the man page for fstab-sync which in turn
references this directory

 /usr/share/doc/hal-0.4.0/conf/

with a few examples. If people want to contribute examples, I'm happy to
take them!

> see if you can read through the default matching/naming policy
> provided and try to contruct local policy from that. Look at the files
> in /usr/share/hal/fdi/
> the file to place local policy should be obvious.
> 

Here's a way to do what James asked for; put the XML below in a file
ending in .fdi (you could call it my-cdrom-names.fdi) in
the /usr/share/hal/fdi/95userpolicy directory

<deviceinfo version="0.2">
  <device>
    <match key="storage.drive_type" string="cdrom">
      <merge key="storage.policy.desired_mount_point" type="string">cdrom</merge>
    </match>
  </device>
</deviceinfo>

When you restart hald (with 'service haldaemon restart') you're all set
(unless, of course, you already have a disc mounted at that location).

You can customize this even further, should you want to (but see below),
by matching on other hal properties - check out hal-device-manager from
the hal-gnome package for a GUI representation of the properties. 

> -jef"hopes tools aimed at hal policy creation show up in rawhide very
> soon after fc3 release for feedback and testing"spaleta
> 

Cheers,
David "hopes that existing software, as well as people, will stop
relying on mount point and device names as it is somewhat inherently
flawed to do so" Zeuthen :-)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]