aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/volumes.go29
-rw-r--r--cmd/podman/system/migrate.go2
-rw-r--r--cmd/podman/system/renumber.go2
-rw-r--r--cmd/podman/system/reset.go2
-rw-r--r--cmd/podman/system/service.go2
-rw-r--r--cmd/podman/system/service_abi.go2
-rw-r--r--cmd/podman/system/service_unsupported.go2
-rw-r--r--cmd/podman/system/varlink.go2
8 files changed, 17 insertions, 26 deletions
diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go
index a70410ad3..63bb8e5f0 100644
--- a/cmd/podman/common/volumes.go
+++ b/cmd/podman/common/volumes.go
@@ -209,36 +209,21 @@ func getBindMount(args []string) (spec.Mount, error) {
switch kv[0] {
case "bind-nonrecursive":
newMount.Options = append(newMount.Options, "bind")
- case "readonly", "read-only":
- if setRORW {
- return newMount, errors.Wrapf(optionArgError, "cannot pass 'readonly', 'ro', or 'rw' options more than once")
- }
- setRORW = true
- switch len(kv) {
- case 1:
- newMount.Options = append(newMount.Options, "ro")
- case 2:
- switch strings.ToLower(kv[1]) {
- case "true":
- newMount.Options = append(newMount.Options, "ro")
- case "false":
- // RW is default, so do nothing
- default:
- return newMount, errors.Wrapf(optionArgError, "readonly must be set to true or false, instead received %q", kv[1])
- }
- default:
- return newMount, errors.Wrapf(optionArgError, "badly formatted option %q", val)
- }
- case "ro", "rw":
+ case "readonly", "ro", "rw":
if setRORW {
return newMount, errors.Wrapf(optionArgError, "cannot pass 'readonly', 'ro', or 'rw' options more than once")
}
setRORW = true
// Can be formatted as one of:
+ // readonly
+ // readonly=[true|false]
// ro
// ro=[true|false]
// rw
// rw=[true|false]
+ if kv[0] == "readonly" {
+ kv[0] = "ro"
+ }
switch len(kv) {
case 1:
newMount.Options = append(newMount.Options, kv[0])
@@ -253,7 +238,7 @@ func getBindMount(args []string) (spec.Mount, error) {
newMount.Options = append(newMount.Options, "ro")
}
default:
- return newMount, errors.Wrapf(optionArgError, "%s must be set to true or false, instead received %q", kv[0], kv[1])
+ return newMount, errors.Wrapf(optionArgError, "'readonly', 'ro', or 'rw' must be set to true or false, instead received %q", kv[1])
}
default:
return newMount, errors.Wrapf(optionArgError, "badly formatted option %q", val)
diff --git a/cmd/podman/system/migrate.go b/cmd/podman/system/migrate.go
index 13aa162c7..28c23d88f 100644
--- a/cmd/podman/system/migrate.go
+++ b/cmd/podman/system/migrate.go
@@ -1,3 +1,5 @@
+// +build !remote
+
package system
import (
diff --git a/cmd/podman/system/renumber.go b/cmd/podman/system/renumber.go
index 5ee6b3be6..b90640de3 100644
--- a/cmd/podman/system/renumber.go
+++ b/cmd/podman/system/renumber.go
@@ -1,3 +1,5 @@
+// +build !remote
+
package system
import (
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go
index 6caa91690..b16fbd9c7 100644
--- a/cmd/podman/system/reset.go
+++ b/cmd/podman/system/reset.go
@@ -1,3 +1,5 @@
+// +build !remote
+
package system
import (
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index 0f42ae28b..1b07ee301 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build linux,!remote
package system
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 3da6ccfc7..501650839 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -1,4 +1,4 @@
-// +build ABISupport
+// +build ABISupport,!remote
package system
diff --git a/cmd/podman/system/service_unsupported.go b/cmd/podman/system/service_unsupported.go
index 95f8189f6..82272c882 100644
--- a/cmd/podman/system/service_unsupported.go
+++ b/cmd/podman/system/service_unsupported.go
@@ -1,4 +1,4 @@
-// +build !ABISupport
+// +build !ABISupport,!remote
package system
diff --git a/cmd/podman/system/varlink.go b/cmd/podman/system/varlink.go
index 6a38b3d28..19535e539 100644
--- a/cmd/podman/system/varlink.go
+++ b/cmd/podman/system/varlink.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build linux,!remote
package system