macos: print load_osxfuse hint if fuse.NewServer fails

Currently neither gocryptfs nor go-fuse automatically call load_osxfuse
if the /dev/osxfuse* device(s) do not exist. At least tell the user
what to do.

See https://github.com/rfjakob/gocryptfs/issues/124 for user pain.
This commit is contained in:
Jakob Unterwurzacher 2017-07-10 23:33:41 +02:00
parent 9f8e19b856
commit 849ec10081

View File

@ -337,6 +337,9 @@ func initFuseFrontend(key []byte, args *argContainer, confFile *configfile.ConfF
srv, err := fuse.NewServer(conn.RawFS(), args.mountpoint, &mOpts) srv, err := fuse.NewServer(conn.RawFS(), args.mountpoint, &mOpts)
if err != nil { if err != nil {
tlog.Fatal.Printf("fuse.NewServer failed: %v", err) tlog.Fatal.Printf("fuse.NewServer failed: %v", err)
if runtime.GOOS == "darwin" {
tlog.Info.Printf("Maybe you should run: /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse")
}
os.Exit(exitcodes.FuseNewServer) os.Exit(exitcodes.FuseNewServer)
} }
srv.SetDebug(args.fusedebug) srv.SetDebug(args.fusedebug)