tuning fstab-sync [was: getting hal and gnome volume manager
to work]
Kay Sievers
kay.sievers at vrfy.org
Sun Sep 5 03:57:07 PDT 2004
On Sun, 2004-09-05 at 12:30 +0200, Artem Baguinski wrote:
> Kay Sievers wrote:
> > On Sat, 2004-09-04 at 23:33 +0200, Artem Baguinski wrote:
> >
> >>Eric Butler wrote:
> >>
> >>>You need to set up fstab-sync so your flash drive is added to fstab.
> >>>
> >>>Grab the latest dbus and hal CVS and run configure with
> >>>--enable-fstab-sync.
> >>>Then make sure you have fstab-sync.hal symlinked into your hal device.d
> >>>directory (on my system it's /usr/local/etc/hal/device.d/)
> >>>
> >>>$ ls -l /usr/local/etc/hal/device.d/
> >>>lrwxrwxrwx 1 root root 26 Aug 30 21:43 fstab-sync.hal ->
> >>>/usr/local/sbin/fstab-sync
> >>>
> >>>HAL looks in this directory for files ending in .hal and executes them
> >>>when a new device is found. Fstab-sync will append the new device to
> >>>fstab so gnome-vfs will see it.
> >>>
> >>>This is all assuming you have a patched gnome-vfs installed of course.
> >>
> >>i seem to have this all setup and when i connect my portable audio
> >>player or digital camera i see usbdisk mounted and the icon appearing on
> >>my desktop. but i'd like my audio player to get mounted as lyra and
> >>camera as sony_camera, rather then any of them as usbdisk. i also would
> >>like to force them to be mounted using vfat filesystem and not msdos.
> >>
> >
> >
> > HAL does not care about moutpoints at the moment. You can write a
> > udev.rule to match your device and put a static string in your fstab.
> > Then HAL will handle it all for you like today, except the fstab will
> > not be updated and the volume is mounted as specified there.
> >
> > If we make use of persistent property store in HAL, we will support
> > this, I expect, as I really want this feature too :)
>
> well, i kinda managed to do that though ;-)
>
> i did have udev rules for both devices, but i was just creating symlinks
> to whatever kernel thinks the device should be. e.g. for my lyra audio
> player i have:
>
> BUS="scsi", SYSFS{model}="PDP2444_48Player", KERNEL="sd?1", NAME="%k",
> SYMLINK="lyra"
>
> this makes /dev/lyra a symlink to /dev/sd?1
>
> i do have the following in my /etc/fstab:
>
> /dev/lyra /mnt/lyra vfat noauto,user,exec,dev,suid 0 0
>
> but HAL sees /dev/sda1 and ignores the symlink
Yeah, just set the NAME in the udev.rule and it will work. The SYMLINK
in udev is just a convenience and the name is not reported anywhere. HAL
can't know about.
> my workaround is to set the following:
>
> <device>
> <match key="storage.model" string="PDP2444_48Player">
> <merge key="storage.drive_type" type="string">lyra</merge>
> </match>
> </device>
>
> in the .fdi file so it gets mounted as /media/lyra (and not as /mnt/lyra
> but i don't care much as long as it appears as "lyra" on desktop).
A later version version of gnome-vfs will set the name used on the
desktop to the label of the filesystem, then you don't need to care
about the name of the device file or the mount point.
Kay
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list