summaryrefslogtreecommitdiff
path: root/pkg/mount/mount.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/mount/mount.go')
-rw-r--r--pkg/mount/mount.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/mount/mount.go b/pkg/mount/mount.go
index 3860b975bd..5ca731601f 100644
--- a/pkg/mount/mount.go
+++ b/pkg/mount/mount.go
@@ -29,8 +29,11 @@ func Mounted(mountpoint string) (bool, error) {
// the target is not mounted
// Options must be specified as fstab style
func Mount(device, target, mType, options string) error {
- if mounted, err := Mounted(target); err != nil || mounted {
- return err
+ flag, _ := parseOptions(options)
+ if flag&REMOUNT != REMOUNT {
+ if mounted, err := Mounted(target); err != nil || mounted {
+ return err
+ }
}
return ForceMount(device, target, mType, options)
}