# With sshfs installed:
MOUNTPOINT=/Volumes/mountdir
REMOTE=user@hostname:/home/dir
OPTIONS=-oping_diskarb,volname=mountdir
TESTHOST=hostname
#test if sshfs already mounted
if ! [ -e $MOUNTPOINT ]
then
#test if connected to internet
if ! [ -z "`ping -c 1 $TESTHOST 2>/dev/null | grep "time="`" ]
then
mkdir $MOUNTPOINT
sshfs $REMOTE $MOUNTPOINT $OPTIONS
echo "$REMOTE mounted on $MOUNTPOINT"
else
echo "Network down, unable to mount $REMOTE"
fi
fi
bash
1
# With sshfs installed:MOUNTPOINT=/Volumes/mountdir
REMOTE=user@hostname:/home/dir
OPTIONS=-oping_diskarb,volname=mountdir
TESTHOST=hostname
#test if sshfs already mountedif ! [ -e $MOUNTPOINT]then#test if connected to internetif ! [ -z "`ping -c 1 $TESTHOST 2>/dev/null | grep "time="`"]thenmkdir $MOUNTPOINT
sshfs $REMOTE$MOUNTPOINT$OPTIONSecho"$REMOTE mounted on $MOUNTPOINT"elseecho"Network down, unable to mount $REMOTE"fifi
Hey there! I see you're running Internet Explorer 6.
That's neat. This reminds me of my grandpa. He had this old car that he kept having to fix. He spent so much money on it that he didn't want to get rid of it (even when it stopped running).
0 Comments