summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/libpodruntime/runtime.go5
-rw-r--r--cmd/podman/umount.go13
2 files changed, 7 insertions, 11 deletions
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go
index 098864810..3216d288b 100644
--- a/cmd/podman/libpodruntime/runtime.go
+++ b/cmd/podman/libpodruntime/runtime.go
@@ -57,6 +57,11 @@ func GetDefaultStoreOptions() (storage.StoreOptions, error) {
if err != nil {
return storageOpts, err
}
+
+ storageConf := filepath.Join(os.Getenv("HOME"), ".config/containers/storage.conf")
+ if _, err := os.Stat(storageConf); err == nil {
+ storage.ReloadConfigurationFile(storageConf, &storageOpts)
+ }
}
return storageOpts, nil
}
diff --git a/cmd/podman/umount.go b/cmd/podman/umount.go
index 0fd7ff144..1a2cf22c6 100644
--- a/cmd/podman/umount.go
+++ b/cmd/podman/umount.go
@@ -58,7 +58,7 @@ func umountCmd(c *cli.Context) error {
continue
}
- if err = unmountContainer(ctr); err != nil {
+ if err = ctr.Unmount(); err != nil {
if lastError != nil {
logrus.Error(lastError)
}
@@ -78,7 +78,7 @@ func umountCmd(c *cli.Context) error {
continue
}
- if err = unmountContainer(ctr); err != nil {
+ if err = ctr.Unmount(); err != nil {
if lastError != nil {
logrus.Error(lastError)
}
@@ -90,12 +90,3 @@ func umountCmd(c *cli.Context) error {
}
return lastError
}
-
-func unmountContainer(ctr *libpod.Container) error {
- if mounted, err := ctr.Mounted(); mounted {
- return ctr.Unmount()
- } else {
- return err
- }
- return errors.Errorf("container is not mounted")
-}