Checking volumes and storage devices for fstab entries

Martin Pitt martin.pitt at ubuntu.com
Sun Dec 17 03:51:23 PST 2006


Hi David,

David Zeuthen [2006-12-14 23:52 -0500]:
>  - gnome-mount has the same code (copy-paste :-( ..) and if it sees the
>    device is in /etc/fstab it uses e.g. "mount /dev/sda" to attempt to
>    mount

This is one case of what I had in mind with 'might be useful for other
applications'. If we can rely on hal about having current fstab
information, those recurring pieces of code for checking fstab could
disappear (see my other reply for a proposal how to keep fstab info
current).

> How about
> 
>  1. Changing HAL so it returns o.fd.Hal.Volume.PermissionDeniedEtcFstab
>     instead of o.fd.Hal.Volume.PermissionDenied if a device is listed
>     in /etc/fstab.
> 
>  2. Allowing sufficiently privileged users to mount even though the
>     device is in /etc/fstab (e.g PK privilege or uid 0). It would only
>     work if the same mount options as in /etc/fstab are passed so in
>     effect it would ignore the passed mount options. It's a bit ugly
>     but I think it's OK a mechanism like HAL respects system-wide
>     policy files like /etc/fstab.
> 
>  3. Making gnome-mount act on o.fd.Hal.Volume.PermissionDeniedEtcFstab
>     by first trying mount(1) (like today) and if that fails then
>     and mount through HAL after gnome-mount has gained privileges. That
>     way we could also delete all the /etc/fstab cut-n-paste parsing code

Sounds great to me.

> Also note that gnome-vfs2 might need some fixing since I'm not sure it 
> works totally reliable for devices listed in /etc/fstab. The problem is 
> that right now gnome-vfs2 keeps a Volume icon for a /etc/fstab volume 
> even though there is no device to back it. That should probably be 
> changed as it simply don't make sense from an usability point of view... 

Hm, not sure what you mean: if I have a bogus entry in fstab, I don't
get an icon for this. But I might not have tried hard enough, or with
my current FDIs just hide that bug.

> Your idea sounds nice I think; it provides admins and users with an easy 
> way to provide system-wide managed options for storage devices. E.g. if 
> I'm an admin I can simply add a line to /etc/fstab and then only those 
> options will be used.

Heh, back to good ol' fstab configuration :)

So, it seems that you generally like the idea? How about I clean up
the current code, think about how to sensibly combine an addon (for
inotify'ing) with a probe (for supporting hotpluggable file systems)
to keep fstab information on hal device nodes current and report back
again?

Thanks, and have a nice weekend,

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/hal/attachments/20061217/3884c570/attachment.pgp


More information about the hal mailing list