autofs - automatic unmounting / syncing. how does HAL help?

David Zeuthen david at fubar.dk
Thu Sep 16 11:03:09 PDT 2004


On Thu, 2004-09-16 at 19:02 +0100, Luke Kenneth Casson Leighton wrote:
> On Thu, Sep 16, 2004 at 07:23:05PM +0200, David Zeuthen wrote:
> 
> > Someone is already working on the KDE Volume Manager. One explicit goal
> 
>  jerome.  been there, got the nonkdebeta/kvm source code, hacked the
>  source code, updated to kdebase+kdelibs cvs latest, added in his
>  horrible dbus-qt-1.so connections patch, eaten the t-shirt....
> 

Heh.

> > Well, HAL is pretty much designed to cope with all this and it works
> > pretty well most of the time. 
> 
>  fantastic.
> 
>  i'm seriously relieved to hear it.
> 

Cool.

>  so.
> 
>  um.
> 
>  why if my usb floppy drive is in (and successfully goes into /etc/fstab
>  under /media/floppy) is it not actually mounted at the moment?
> 

By itself HAL doesn't enforce any policy at all. 

What you're seeing is a policy choice made in fstab-sync - which we ship
with HAL, but it is not part of HAL proper. The reason we actually add
things like /media/floppy and /media/cdrom is because a lot of software
out there (GNOME VFS and KDE kioslaves being two of them) depends on
this. If we didn't we would break that software.

If we wanted we could just add /media/<floppy-label> on insertion of
floppy disks. This works fine for USB floppy drives, but it won't work
on legacy x86 floppy drives (well, we *could* poll but it's noisy!).

Actually, in that situation (non-polling) hal notices when you
mount/unmount and adds a hal device object representing the volume as
appropriate.

>  oh, i see.... comments in block_class_device.c about an LS120 polling
>  not working?
> 
>  hum, i imagine it'd be okay (if i can solve the /dev/sda -->
>  /dev/floppy/0 problem) to just let KDE take care of it as
>  access to "floppy:/"
> 

Right. You can just check all hal devices and search for a device object
with the property storage.drive_type="floppy". You can use libhal to do
stuff like that.

>  i'll let you know what i dream up there, it might involve some
>  hacks to KDE's kioslave floppy device code (to cope with floppy:/sda
>  or something) it might involve a script in /etc/hal/devices.d.
> 

Interesting.

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



More information about the Hal mailing list