Skip to content

Commit

Permalink
Merge 7f477d4 into 31c54b5
Browse files Browse the repository at this point in the history
  • Loading branch information
clintkitson committed May 9, 2016
2 parents 31c54b5 + 7f477d4 commit fc32897
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 6 additions & 0 deletions daemon/module/module.go
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/akutz/gotil"
"github.com/emccode/libstorage"
apitypes "github.com/emccode/libstorage/api/types"
"github.com/emccode/rexray/util"
)

// Module is the interface to which types adhere in order to participate as
Expand Down Expand Up @@ -161,6 +162,11 @@ func InitializeDefaultModules() error {
}
}

if !c.IsSet("libstorage.integration.docker.mountDirPath") {
c.Set("libstorage.integration.docker.mountDirPath",
util.LibFilePath("volumes"))
}

lsc, _, err, errs := libstorage.New(c)
if err != nil {
panic(err)
Expand Down
11 changes: 5 additions & 6 deletions rexray/cli/cli.go
Expand Up @@ -320,10 +320,12 @@ func (c *CLI) preRun(cmd *cobra.Command, args []string) {

c.updateLogLevel()

if !c.config.IsSet("docker.mountDirPath") {
c.config.Set("docker.mountDirPath", util.LibFilePath("volumes"))
if !c.config.IsSet(
"libstorage.integration.docker.mountDirPath") {
c.config.Set(
"libstorage.integration.docker.mountDirPath",
util.LibFilePath("volumes"))
}

c.config = c.config.Scope("rexray.modules.default-docker")

if isHelpFlag(cmd) {
Expand Down Expand Up @@ -351,9 +353,6 @@ func (c *CLI) preRun(cmd *cobra.Command, args []string) {
if c.runAsync {
c.ctx = c.ctx.WithValue("async", true)
}
if !c.config.IsSet("docker.mountDirPath") {
c.config.Set("docker.mountDirPath", util.LibFilePath("volumes"))
}

r, rs, err, _ := libstorage.New(c.config.Scope("rexray"))
if err == nil {
Expand Down

0 comments on commit fc32897

Please sign in to comment.