aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2007-01-18 12:52:54 +0000
committerrsc <devnull@localhost>2007-01-18 12:52:54 +0000
commit9b3fcf01c5d22d7be320a0e194cc54579f71c409 (patch)
tree62c73a298ebd2f52872ffb72ef6cec4a6b483165 /bin
parente290e875f350dbbc2288ec988d939a57cc8f9bf2 (diff)
downloadplan9port-9b3fcf01c5d22d7be320a0e194cc54579f71c409.tar.gz
plan9port-9b3fcf01c5d22d7be320a0e194cc54579f71c409.tar.bz2
plan9port-9b3fcf01c5d22d7be320a0e194cc54579f71c409.zip
Mac FUSE support (thanks to Jeff Sickel)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mount5
-rwxr-xr-xbin/unmount4
2 files changed, 7 insertions, 2 deletions
diff --git a/bin/mount b/bin/mount
index f20304b4..3cc36adb 100755
--- a/bin/mount
+++ b/bin/mount
@@ -18,6 +18,11 @@ case FreeBSD
if(kldstat|9 grep -si ' fuse')
exec 9pfuse $1 $2
echo 'don''t know how to mount (no fuse)' >[1=2]
+case Darwin
+ if(sysctl fuse.version >[2=1] |9 grep -si 'fuse.version' ||
+ test -d /System/Library/Extensions/fusefs.kext)
+ exec 9pfuse $1 $2
+ echo 'don''t know how to mount (no fuse)' >[1=2]
case *
echo 'can''t mount on' `{uname} >[1=2]
}
diff --git a/bin/unmount b/bin/unmount
index 3d2760f8..6323e843 100755
--- a/bin/unmount
+++ b/bin/unmount
@@ -1,10 +1,10 @@
-#!/usr/local/plan9/bin/rc
+l#!/usr/local/plan9/bin/rc
if(! ~ $#* 1){
echo 'usage: unmount mtpt' >[1=2]
exit usage
}
f=`{u mount | grep $1}
-if(echo $f | 9 grep -s 'type fuse')
+if(echo $f | 9 grep -s 'type fuse' && ! ~ `{uname} Darwin)
exec fusermount -u -z $1
exec u umount $1