mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
4c87b222f1
1. Use more readable mount point information 2. Fix some typos eg: $ df -Th Filesystem Type Size Used Avail Use% Mounted on localhost:8888:/ fuse.seaweedfs 206G 512 206G 1% /mnt/weedfs $ mount | grep weedfs localhost:8888:/ on /mnt/weedfs type fuse.seaweedfs (rw,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other) Signed-off-by: Lei Liu <lei01.liu@horizon.ai>
26 lines
503 B
Go
26 lines
503 B
Go
package command
|
|
|
|
import (
|
|
"github.com/chrislusf/seaweedfs/weed/util"
|
|
"github.com/seaweedfs/fuse"
|
|
)
|
|
|
|
func osSpecificMountOptions() []fuse.MountOption {
|
|
return []fuse.MountOption{
|
|
fuse.AllowNonEmptyMount(),
|
|
}
|
|
}
|
|
|
|
func checkMountPointAvailable(dir string) bool {
|
|
mountPoint := dir
|
|
if mountPoint != "/" && strings.HasSuffix(mountPoint, "/") {
|
|
mountPoint = mountPoint[0 : len(mountPoint)-1]
|
|
}
|
|
|
|
if mounted, err := util.Mounted(mountPoint); err != nil || mounted {
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|