Commit ea5183e8 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Exit early if fusermount not found.

parent cbad86d3
......@@ -4,6 +4,7 @@ package fuse
import (
"exec"
"fmt"
"log"
"os"
"path/filepath"
"syscall"
......@@ -153,6 +154,13 @@ func getConnection(local *os.File) (f *os.File, err os.Error) {
}
func init() {
fusermountBinary, _ = exec.LookPath("fusermount")
var err os.Error
fusermountBinary, err = exec.LookPath("fusermount")
if err != nil {
log.Fatal("Could not find fusermount binary: %v", err)
}
umountBinary, _ = exec.LookPath("umount")
if err != nil {
log.Fatalf("Could not find umount binary: %v", err)
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment