aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-26 11:29:02 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-26 16:33:25 +0000
commit6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6 (patch)
tree7fb44c59e3c9feae18d402dda0c899a959e61459 /cmd
parentd7d0e13837a0a2ce0b5432373892d28dbbfc0342 (diff)
downloadpodman-6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6.tar.gz
podman-6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6.tar.bz2
podman-6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6.zip
Add --default-mounts-file hidden flag
The hidden flag is used to override the path of the default mounts file for testing purposes. Also modified the secrets pkg to allow for this override to happen. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #678 Approved by: mheon
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/main.go5
-rw-r--r--cmd/podman/utils.go3
2 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index a283c2622..aefde3b93 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -125,6 +125,11 @@ func main() {
Usage: "path for the cpu profiling results",
},
cli.StringFlag{
+ Name: "default-mounts-file",
+ Usage: "path to default mounts file",
+ Hidden: true,
+ },
+ cli.StringFlag{
Name: "hooks-dir-path",
Usage: "set the OCI hooks directory path",
Value: hooks.DefaultHooksDir,
diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go
index cf0047db9..a74c338cc 100644
--- a/cmd/podman/utils.go
+++ b/cmd/podman/utils.go
@@ -58,6 +58,9 @@ func getRuntime(c *cli.Context) (*libpod.Runtime, error) {
if c.GlobalIsSet("cni-config-dir") {
options = append(options, libpod.WithCNIConfigDir(c.GlobalString("cni-config-dir")))
}
+ if c.GlobalIsSet("default-mounts-file") {
+ options = append(options, libpod.WithDefaultMountsFile(c.GlobalString("default-mounts-file")))
+ }
options = append(options, libpod.WithHooksDir(c.GlobalString("hooks-dir-path")))
// TODO flag to set CNI plugins dir?