On Wednesday 22 June 2005 20:29, Kaj Haulrich wrote:
> On Wednesday 22 June 2005 20:51, Derek Jennings wrote:
> > I just got my daughter an MP3 player. It is an MPeye 5 GB model,
> > and very nice it is too. Plays Ogg, No DRM, No host software.
> > (Interesting how today we rate a product by the features it lacks
> >
> > :-)
> >
> > When I plug it into my USB2 port it is recognised perfectly and
> > comes up as /mnt/removable and everything works 'out of the box'
> >
> > The only problem I have is that when I delete a file on the
> > mp3player it does not really get deleted unless I perform a
> > 'sync'
> > Now I know this, but I cannot count on my daughter remembering to
> > do it, so I would like to add the 'sync' option to the fstab
> > entry that is automatically created when I plug the player in.
> >
> > Trouble is this new 'hal' system is confusing and I do not know
> > where the default configuration for usb-storage is kept.
> >
> > Can anyone enlighten me?
>
> Derek, I don't know if this is relevant to your problem, but it
> touches an old complaint of mine : fstab being "volatile", meaning
> one can't edit it reliably. My MP3 player doesn't need a sync
> however. I can delete files OK, but I had plenty of troubles with
> other USB devices, like scanners, cameras and external hard disks.
> As far as I remember I solved some of those problems with
> "gnome-volume-manager" and HAL.
>
> If you don't have it under system --> Configuration --> Hardware -->
> Removable Storage, just : urpmi gnome-volume-manager.
>
> HTH
>
> Kaj Haulrich.
OK found out how to do it. I wish someone would write this down. Its so
frustrating trying to work out how stuff works.
For the record :-
Hal uses the config files in /usr/share/hal
(Why they are not in /etc like all the other config files I do not know)
The files are in XML format and are processed by fstab-sync See 'man
fstab-sync' for clues.
The default settings are controlled by /usr/share/hal/fdi/90defaultpolicy all
the files in there are processed when a device is found. If the device
matches a config then it is applied.
User specific config is found in /usr/share/hal/fdi/95userpolicy these files
are processed after the defaults. Do not edit the default files. They will be
overwritten when you upgrade your linux. Make all edits
in /usr/share/hal/fdi/95userpolicy. See /usr/share/doc/hal-0.4.7 for examples
To get my mp3 player working correctly I created a
file /usr/share/hal/fdi/95userpolicy/storage-policy.fdi containing
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<!-- Example: Match a volume from an USB Storage Based mp3 player
by the file system UUID assign a mount point and set the sync
option in fstab.
NB: When reformatting the volume a new UUID will be
used and this rule will have to be altered -->
<device>
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="volume.uuid" string="0C15-8CCD">
<merge key="volume.policy.desired_mount_point"
type="string">mp3player</merge>
<merge key="volume.policy.mount_option.sync" type="bool">true</merge>
</match>
</match>
</match>
</device>
</deviceinfo>
where the uuid string for the player is discovered by running
hal-device-manager and looking at the advanced tab when the device is plugged
in.
Yes Anne I will put it in the Twiki
derek
--
www.jennings.homelinux.net
http://twiki.mdklinuxfaq.org
____________________________________________________
Want to buy your Pack or Services from Mandriva?
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________