You are not logged in.
Helo everyone
i have changed recently from windows xp to Arch Linux+LXDE- Everything works fine except one very annoying thing.
I have a USB HDD connected to my EasyBox803A Router which i can access from my Windows 7 Client (using the Windows Explorer) and also from my Arch Linux (using gvfs-mount). After connecting manually, using gvfs-mount smb://easybox/Dokumente, i can browse the folder, create new files etc. everything works fine.
But now i want to connect the drives automatically if my wlan connection is up and running. And here comes the headache...
If i am using the following in my /etc/Networkmanager/dispatcher.d/handler.sh
#!/bin/sh
# Verbinde Netzlaufwerke
INTERFACE=$1 # interface über das die Verbindung aufgebaut wurde
STATUS=$2 # Status der Verbindung
echo $0", "$1"/"$2 > /tmp/nfs.log
case "$STATUS" in
up) # interface active
ESSID=$(iwconfig wlan0 | grep ESSID | cut -d ":" -f 2 | sed -e 's/"//g$
echo "ESSID: "$ESSID >> /tmp/nfs.log
PERS=$(whoami)
echo "User: "$PERS >> /tmp/nfs.log
gvfs-mount smb://easybox/Dokumente>> /tmp/nfs.log
PERS=$(whoami)
echo "User2: "$PERS >> /tmp/nfs.log
;;
'down') # interface ist down
gvfs-mount -s smb://easybox/Dokumente
;;
esac
i get the following in my /tmp/nfs.log
/etc/NetworkManager/dispatcher.d/30_netfs.sh, wlan0/up
ESSID: ASAK_HEIM
User: root
User2: root
so it doesn't prompt something like "cannot connect drive" or anything else. But now i have no entry in my ~/.gvfs directory.
I thought this is because gvfs-mount is run as root and so i changed the call of gvfs-mount to
su sakphul -c gvfs-mount smb://easybox/Dokumente
but this also didn't work. It still won't connect my drives.
Since 3 days i have tried even more things which all didn't work....and i now really don't know why. Does anyone know why it won't run?
I can also connect via smbclient //easybox/Dokumente -U% to my easybox and browse the folder. So it is really working...but not if it is run from the dispatcher...
P.S. mount -t cifs won't work because it looks like the easyboox does not support cif
Last edited by Sakphul (2012-02-07 22:28:42)
Offline