writing to fstab or mtab
Hello,
I've created a construction which mounts via autofs local (USB devices) and remote resources (SMB, FTP and SSH) resources in
a subdirectory of the homedirectory of the user logged in. This works with ConsoleKit, udev and autofs.
Look at:
http://linux.bononline.nl/linux/autofsmanaged/index.php
It looks like:
http://www.gentoo-wiki.info/Autofs#UDEV_with_autofs
But there is some trouble with hal, hal tries to mount the local devices at /media, which is exported to the desktopenvironment KDE. This leads to the confusing situation that in the places toolbar there is a icon for the device, and in my homedirectory a directory managed by autofs. When I click on the icon, the device is mounted at /media, when I enter the directory
$HOME/Connections/Devices/USB stick
(for example), it's mounted here.
The nice thing here is that the icon in my places toolbar changes also then. It's notified (via mtab/HAL I think) that the device is mounted. Now when I click on it, Dolphin leads me to the right place.
Now to prevent HAL to try to mount the device at /media, the scripts in my contruction write a line to /etc/fstab, like:
/dev/sdb1 /home/sbon/Connections/Devices/USB\040stick auto noauto,user 0 0
This works very good, but this setting in fstab confuses the automounter. I'm not trying to solve my problem here with hal, but how come the setting in fstab to confuse autofs?
Stef Bon
PS problems with hal are there because it's to rigid about where devices are mounted, and it's not aware of user sessions.
Linux is a multiuser system, but HAL not.
Quoted 9 lines · Stef Bon
Hello,
Now to prevent HAL to try to mount the device at /media, the scripts in my contruction write a line to/etc/fstab, like:
/dev/sdb1/home/sbon/Connections/Devices/USB\040stick auto noauto,user 0 0This works very good, but this setting in fstab confuses the automounter. I'm not trying to solve my problem here with hal, but how come the setting in fstab to confuse autofs?
Stef, you're going to have to be a bit more specific! What do you mean it confuses the automounter? What behaviour is expected/observed? Do you have a debug log?
Cheers,
Jeff
Quoted 14 lines · Jeff Moyer
Quoted 10 lines · Stef Bon
Hello,
Now to prevent HAL to try to mount the device at /media, the scripts in my contruction write a line to/etc/fstab, like:
/dev/sdb1/home/sbon/Connections/Devices/USB\040stick auto noauto,user 0 0This works very good, but this setting in fstab confuses the automounter. I'm not trying to solve my problem here with hal, but how come the setting in fstab to confuse autofs?
Quoted 8 lines
Stef, you're going to have to be a bit more specific! What do you mean it confuses the automounter? What behaviour is expected/observed? Do you have a debug log?
Cheers,
Jeff
Thanks for your reply,
I've solved the problem already by adding the --timeout=0 option to the map for usb devices.
Then by activating the mount directly, the mount is written to mtab. KDE finds this mount then, and bypasses HAL, what is the goal.
Stef