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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s