You are not logged in.

#1 2009-02-01 19:04:49

panosk
Member
From: Athens, Greece
Registered: 2008-10-29
Posts: 241

automount samba shares with wicd or otherwise

Hello

Since Dolphin cannot really mount samba shares, I thought I will try to automount them through wicd. So, I created a script that simply runs the mount command

mount -t cifs //MyServer/MyDir -o username=myuser,password=mypassword,iocharset=utf8 /mnt/MountPoint

and put it in the post-connection box. It works. However, I would like to unmount the share when I disconnect (to be precise, just before the disconnection) or when I log out. Unfortunately, the after-disconnection box in wicd runs the script exactly as stated - after the disconnection, so I can't put an unmount script in there. The reason I want to do this is because I am using a laptop and I want to automatically mount my shares when I connect to my home wireless network.

Any ideas?

Offline

#2 2009-02-01 20:02:25

scarecrow
Member
From: Greece
Registered: 2004-11-18
Posts: 715

Re: automount samba shares with wicd or otherwise

Why don't you put the same string in /etc/fstab with a "noauto" switch and then simply run
sudo mount /mnt/MountPoint
whenever you need it?
This is what I'm doing myself since smbnetfs/smbfs began behaving like crap (not sure why, but I'm too lazy to debug their numerous and inconsequent failures).

Last edited by scarecrow (2009-02-01 20:03:02)


Microshaft delenda est

Offline

#3 2009-02-01 22:38:18

panosk
Member
From: Athens, Greece
Registered: 2008-10-29
Posts: 241

Re: automount samba shares with wicd or otherwise

Thanks folk smile, I followed your advice, although it took me some time to figure out how to handle spaces in share names inside fstab.. (the usual escape chars just don't work).

Offline

Board footer

Powered by FluxBB