MacFUSION workaround

Upgrading to OS X 10.6.3 broke the excellent MacFusion mounting app. For those like me, who depend upon SSHFS mount, there is a workaround using static sshfs mounting.

Building upon a post in the MacFusion-devel group, I put together a generic script to mount any sshfs host and possibly multiple of them at a time.

#!/bin/bash
 
# Split the $1 for useful information
usr=${1/@*/}
usr=${usr:=$USER}
[[ $1 =~ ":" ]] && dst=${1/*:/}
srv=${1/*@/}
srv=${srv/:$dst/}
# If server name is missing, exit
srv=${srv:?"Server name missing!"}
 
# If dst folder is given, add it to mountpoint
mnt=$srv${dst:+"_$dst"}
# substitute _ for every / in the mount point name
mnt=${mnt////_}
 
# if dst is not given, make it .
dst=${dst:=.}
 
mkdir /Volumes/$mnt
/Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static $usr@$srv:$dst /Volumes/$mnt

Put this script wherever you like and run it like

./mount_sshfs user@remotehost:/some/dir

Thanks to: renatojf for the original idea.

If you have thoughts or something to contribute, grab it at GIST:

http://gist.github.com/423820

Related posts:

  1. MacFuse and Mac OS X Lion
  2. MTS to MP4 converter

Leave a Comment

* Copy this password:

* Type or paste password here:


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">