Skip to content

Commit

Permalink
support mount.juicefs graceful upgrade (#4487)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Mar 12, 2024
1 parent 4d97cdb commit fe954c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ func Main(args []string) error {
}

func calledViaMount(args []string) bool {
return strings.HasSuffix(args[0], "/mount.juicefs")
if os.Getenv("CALL_VIA_MOUNT") != "" {
return true
}
if strings.HasSuffix(args[0], "/mount.juicefs") {
os.Setenv("CALL_VIA_MOUNT", "1")
return true
}
return false
}

func handleSysMountArgs(args []string) ([]string, error) {
Expand Down

0 comments on commit fe954c7

Please sign in to comment.