LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-21-2010, 11:04 PM   #1
mulebreath
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Rep: Reputation: 0
NetworkManagerDispatcher and sshfs


Can't get the two to work together, I am trying to mount a directory on my home server from a remote location automatically when the wireless connection comes up.

First thing I do is ssh-add and enter my passphrase as root.
Then I run this script in /etc/NetworkManager/dispatcher.d/

------------------------
#!/bin/bash

SSID=`iwgetid --raw`

if [ $2 == "up" ] && [ $SSID == "work" ]; then

sshfs -o sftp_server=/opt/libexec/sftp-server,allow_other example.com:/mnt/bob /home/bob/remote/

fi
------------------------
owner root:root 755

The only error message I ever get is: "Script '/etc/NetworkManager/dispatcher.d/mounting.sh' exited with error status 1", which isn't a lot of help.

The sshfs line is the problem, if I replace it with a simple touch command or whatever, that command will run fine.

When I run this command from cl as root, it works fine. When I run the command as a regular user (add sudo -E to the front of it), it works fine as well. But when I run it in the script, it will not work.

Does anyone have any idea what I'm missing, why NetworkManagerDispatcher refuses to run this perfectly fine command.

tia
 
Old 09-22-2010, 03:47 AM   #2
mulebreath
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Actually, after much time and effort, I'm going to scrap the whole sshfs thing as a solution anyway. It regularly and often just goes into a complete hang. And nautilus (in common with any windows os) handles an unresponsive network share like a flaming turd, turn off the computer and soak it in cold water to get it up again.
Couldn't get remote samba working, couldn't get sshfs working, I've got openvpn left to try. The little penguin is kicking my ass yet again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sshfs tunnelling dair-targ Linux - Networking 5 03-28-2010 11:33 AM
sshfs vs. shfs airman99 Linux - Networking 3 07-18-2007 08:59 PM
SSHFS Drawbacks jerril Linux - Software 5 11-26-2006 06:21 PM
sshfs mounting read-only cgraf Linux - Software 1 08-18-2006 03:58 PM
Anyone using Slackware and SSHFS? JockVSJock Slackware 6 12-20-2005 06:22 AM


All times are GMT -5. The time now is 07:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration