aboutsummaryrefslogtreecommitdiff
path: root/pkg/util/mountOpts.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/util/mountOpts.go')
-rw-r--r--pkg/util/mountOpts.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go
index 489e7eeef..40c99384d 100644
--- a/pkg/util/mountOpts.go
+++ b/pkg/util/mountOpts.go
@@ -20,26 +20,22 @@ func ProcessOptions(options []string) []string {
foundbind, foundrw, foundro bool
rootProp string
)
+
for _, opt := range options {
switch opt {
case "bind", "rbind":
foundbind = true
- break
- }
- }
- if !foundbind {
- options = append(options, "rbind")
- }
- for _, opt := range options {
- switch opt {
- case "rw":
- foundrw = true
case "ro":
foundro = true
+ case "rw":
+ foundrw = true
case "private", "rprivate", "slave", "rslave", "shared", "rshared":
rootProp = opt
}
}
+ if !foundbind {
+ options = append(options, "rbind")
+ }
if !foundrw && !foundro {
options = append(options, "rw")
}