tuning fstab-sync [was: getting hal and gnome volume manager to work]

Artem Baguinski artm at v2.nl
Sun Sep 5 03:30:19 PDT 2004


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

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).

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list