forked from Ivasoft/objectivefs-docker-volume
This commit is contained in:
10
main.go
10
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{
|
||||
|
||||
Reference in New Issue
Block a user