From 6ac8a24db4ab3e2bbc85feca2bee8cb1c868c7f6 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Thu, 26 Apr 2018 11:29:02 -0400 Subject: 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 Closes: #678 Approved by: mheon --- cmd/podman/main.go | 5 +++++ cmd/podman/utils.go | 3 +++ 2 files changed, 8 insertions(+) (limited to 'cmd/podman') 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 @@ -124,6 +124,11 @@ func main() { Name: "cpu-profile", 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", 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? -- cgit v1.2.3-54-g00ecf