Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

configurable fusermount path

danielfliraa66112c9d258
diff --git a/weed/command/fuse.go b/weed/command/fuse.go
index 3949d8f70d..09dec388f4 100644
--- a/weed/command/fuse.go
+++ b/weed/command/fuse.go
@@ -23,6 +23,7 @@ func runFuse(cmd *Command, args []string) bool {
option := strings.Builder{}
options := []parameter{}
masterProcess := true
+ fusermountPath := ""
// first parameter
i := 0
@@ -187,6 +188,8 @@ func runFuse(cmd *Command, args []string) bool {
} else {
panic(fmt.Errorf("readRetryTime: %s", err))
}
+ case "fusermount.path":
+ fusermountPath = parameter.value
}
}
@@ -213,6 +216,16 @@ func runFuse(cmd *Command, args []string) bool {
return true
}
+ if fusermountPath != "" {
+ if err := os.Setenv("PATH", fusermountPath); err != nil {
+ panic(fmt.Errorf("setenv: %s", err))
+ }
+ } else if os.Getenv("PATH") == "" {
+ if err := os.Setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin"); err != nil {
+ panic(fmt.Errorf("setenv: %s", err))
+ }
+ }
+
// just call "weed mount" command
return runMount(cmdMount, []string{})
}