Created
January 4, 2013 03:24
-
-
Save canadaduane/4449665 to your computer and use it in GitHub Desktop.
Mounts an external drive via SSHFS+OSXFuse, using a Linux Virtual Machine to read/write to an Ext3 filesystem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UBUNTU_IP=172.16.232.100 | |
GUEST_DIR=/media/duane | |
MOUNTPOINT=/tmp/archive | |
if [ ! -d "$MOUNTPOINT" ]; then | |
echo "Mount point $MOUNTPOINT does not exist, creating..." | |
mkdir -p $MOUNTPOINT | |
fi | |
FIRSTDIR=`ls -1 $MOUNTPOINT` | |
if [ "$FIRSTDIR" = "" ]; then | |
echo "Mounting via sshfs..." | |
sshfs root@$UBUNTU_IP:$GUEST_DIR $MOUNTPOINT -o daemon_timeout=500 | |
fi | |
echo "Opening mount point in finder..." | |
open $MOUNTPOINT/`ls -1 $MOUNTPOINT` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://makerhome.ca/getting-readwrite-access-to-an-ext3-filesyste for context.