GNOME Bugzilla – Bug 149977
G-V-M should resolve symlinks in fstab before attempting mount
Last modified: 2006-08-01 15:26:03 UTC
If a link exists in fstab, such as /dev/cdrom, instead of the actual path, /dev/hdc or something, g-v-m will not mount it. It just runs the mount command followed by the device it detected the event on, which fails.
Created attachment 30479 [details] [review] patch to resolve device in fstab Here is a patch to "fix" this behavior. It uses the "mntent" API. It's fairly simple. Upon calling gvm_mount_device, the device is matched against each entry in the fstab file, resolved to it's realpath. If the device matches, it is returned to gvm_mount_device. I wanted to return proper GErrors, so I created a GQuark for the domain at the top of the new function. This is not right, but I'm leaving that up to somebody who knows what they're doing. ;0
Patch is fine, but what is the big deal with just forcing the user to have the right entry in fstab? Besides, the actual fix is in mount(1) not g-v-m. Anyhow, if HAL manages your fstab, it is not a problem.
You're right. However, many distros (Debian of the top of my head) by default put /dev/cdrom, or another similar symlink, in fstab. Also, the world not being perfect, some people might not want HAL to be editing this file for them. Do we simply force those people to alter their file manually before it works? I would go for a dual approach. First off, HAL *should* put the correct entries in this file. And second, GVM should work in both cases.
*** Bug 153767 has been marked as a duplicate of this bug. ***
In debian symlinks now work OK, but the debian maintainer applied some extra patches. So it might be that
this patch can no longer be applied to CVS due to some of my recent changes... anyway, it shouldn't fail simply because the device wasn't in /etc/fstab - it's possible the mount could still work (especially with my latest changes that allow setting the mount command at compile-time). overall, though, I agree with Rob that this should really be fixed in mount (or just fixing /etc/fstab) and not g-v-m. Having to parse /etc/fstab just feels dirty to me.
*** Bug 155637 has been marked as a duplicate of this bug. ***
closing as not a bug in g-v-m
Why is it not a bug? IMHO opinion it would be better that gvm solves this instead of every maitainer for a distro that has symlinks for certain devices.
It seems this is gnome-vfs2 bug, so please don't resolve as NOTABUG, but reassign to gnome-vfs2