From 228f678c08d48063b784d965c16f2b08251995ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Van=C3=AD=C4=8Dek?= Date: Fri, 26 May 2023 12:55:31 +0200 Subject: [PATCH] No options detection --- main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ae7ef33..3c909aa 100644 --- a/main.go +++ b/main.go @@ -163,8 +163,16 @@ func (d ofsDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, error) if err := os.MkdirAll(v.volume.Mountpoint, 0755); err != nil { return &volume.MountResponse{}, err } + + var opts string + if len(v.opts) == 0 { + opts = "" + } else { + opts = "-o" + v.opts + } + // Note: The first argument ("mount") causes running in the foreground, its absence in the background - cmd := exec.Command("/sbin/mount.objectivefs", "mount", "-o"+v.opts, v.fs, v.volume.Mountpoint) + cmd := exec.Command("/sbin/mount.objectivefs", "mount", opts, v.fs, v.volume.Mountpoint) cmd.Env = v.env cmdReader, _ := cmd.StderrPipe() log.WithFields(log.Fields{