aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9pfuse
diff options
context:
space:
mode:
authorXiao-Yong Jin <xjin@anl.gov>2018-03-14 20:17:10 -0500
committerDavid du Colombier <0intro@gmail.com>2018-03-27 15:01:46 +0200
commita5b24c22a865f2ea3ee389b9d0a235bf7d93f5a6 (patch)
tree5ec9369d54fa6dc6f2cce3626a8e33af06e9d98c /src/cmd/9pfuse
parent4ebaf18e9234bf58aae7a5c47fc15ec4c80812b6 (diff)
downloadplan9port-a5b24c22a865f2ea3ee389b9d0a235bf7d93f5a6.tar.gz
plan9port-a5b24c22a865f2ea3ee389b9d0a235bf7d93f5a6.tar.bz2
plan9port-a5b24c22a865f2ea3ee389b9d0a235bf7d93f5a6.zip
mount, 9pfuse: detect macports installed osxfuse
MacPorts installs osxfuse under /opt/local.
Diffstat (limited to 'src/cmd/9pfuse')
-rw-r--r--src/cmd/9pfuse/fuse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/9pfuse/fuse.c b/src/cmd/9pfuse/fuse.c
index b84663e9..66f66065 100644
--- a/src/cmd/9pfuse/fuse.c
+++ b/src/cmd/9pfuse/fuse.c
@@ -810,6 +810,8 @@ mountfuse(char *mtpt)
"/Support/load_osxfusefs"), 0) < 0 &&
access((v="osxfuse", f="/Library/Filesystems/osxfuse.fs"
"/Contents/Resources/load_osxfuse"), 0) < 0 &&
+ access((v="osxfuse", f="/opt/local/Library/Filesystems/osxfuse.fs"
+ "/Contents/Resources/load_osxfuse"), 0) < 0 &&
access((v="fusefs", f="/System/Library/Extensions/fusefs.kext"
"/Contents/Resources/load_fusefs"), 0) < 0 &&
access(f="/Library/Extensions/fusefs.kext"
@@ -874,6 +876,12 @@ mountfuse(char *mtpt)
execl("/Library/Filesystems/osxfuse.fs/Contents/Resources/mount_osxfuse",
"mount_osxfuse", buf, mtpt, nil);
+ /* OSXFUSE >=3.3 from macports */
+ putenv("MOUNT_OSXFUSE_DAEMON_PATH",
+ "/opt/local/Library/Filesystems/osxfuse.fs/Contents/Resources/mount_osxfuse");
+ execl("/opt/local/Library/Filesystems/osxfuse.fs/Contents/Resources/mount_osxfuse",
+ "mount_osxfuse", buf, mtpt, nil);
+
/* Lion OSXFUSE location */
putenv("MOUNT_FUSEFS_DAEMON_PATH",
"/Library/Filesystems/osxfusefs.fs/Support/mount_osxfusefs");