aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMartin Kühl <martin.kuehl@gmail.com>2018-01-31 14:43:49 +0100
committerDavid du Colombier <0intro@gmail.com>2018-03-23 11:58:20 +0100
commit72fc31acb3d91224d1ebf8769076cc3c4e2d2ed5 (patch)
treea37e57fe35c76bbe329b18cf47c7fc0793bbc6f4 /bin
parentd5791246822e27ef99a593d11518b457ce439a85 (diff)
downloadplan9port-72fc31acb3d91224d1ebf8769076cc3c4e2d2ed5.tar.gz
plan9port-72fc31acb3d91224d1ebf8769076cc3c4e2d2ed5.tar.bz2
plan9port-72fc31acb3d91224d1ebf8769076cc3c4e2d2ed5.zip
mount: check current osxfuse kext location
Current versions of osxfuse ship with multiple versions of its kernel extension (kext) for differend versions of macOS. Running mount(1) on macOS with a current version of osxfuse fails with `don't know how to mount (no fuse)' since it fails to find the kext. Running 9pfuse(4) directly works fine. This change adds a check to mount(1) that determines: 1) which version of macOS we're running on 2) if there is an osxfuse kext available for this version of macOS
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mount2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/mount b/bin/mount
index 79b974f7..a343a532 100755
--- a/bin/mount
+++ b/bin/mount
@@ -19,10 +19,12 @@ case FreeBSD
exec 9pfuse $1 $2
echo 'don''t know how to mount (no fuse)' >[1=2]
case Darwin
+ version=`{sw_vers -productVersion|cut -d. -f1,2}
if(sysctl fuse.version >[2]/dev/null |9 grep -si 'fuse.version' ||
sysctl macfuse.version.number >[2]/dev/null |9 grep -si 'fuse.version' ||
sysctl osxfuse.version.number >[2]/dev/null |9 grep -si 'fuse.version' ||
test -d /System/Library/Extensions/fusefs.kext ||
+ test -d /Library/Filesystems/osxfuse.fs/Contents/Extensions/$version/osxfuse.kext ||
test -d /Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext ||
test -d /Library/Filesystems/fusefs.fs/Support/fusefs.kext)
exec 9pfuse $1 $2