Skip to content

Commit

Permalink
rfs args
Browse files Browse the repository at this point in the history
  • Loading branch information
rawdaGastan committed Oct 15, 2023
1 parent 84b01b3 commit 839fe32
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions pkg/flist/flist.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,31 +207,27 @@ func (f *flistModule) mountRO(url, storage string) (string, error) {
}

logPath := filepath.Join(f.log, hash) + ".log"

flistExt := filepath.Ext(flistPath)
var args []string

if flistExt == ".flist" {
args = append(args,
"--storage-url", storage,
)
}

args = append(args,
flistExt := filepath.Ext(url)
args := []string{
"--cache", f.cache,
"--meta", flistPath,
"--daemon",
"--log", logPath,
// this is always read-only
"--ro",
mountpoint,
)
}

sublog.Info().Strs("args", args).Msg("starting 0-fs daemon")
var cmd *exec.Cmd
if flistExt == ".flist" {
sublog.Info().Strs("args", args).Msg("starting g8ufs daemon")
args = append(args,
"--storage-url", storage,
// this is always read-only
"--ro",
mountpoint,
)
cmd = f.commander.Command("g8ufs", args...)
} else if flistExt == ".fl" {
sublog.Info().Strs("args", args).Msg("starting rfs daemon")
args = append([]string{"mount"}, append(args, mountpoint)...)
cmd = f.commander.Command("rfs", args...)
}

Expand Down

0 comments on commit 839fe32

Please sign in to comment.