Commit cbf0945a authored by zhangxiaoyu-zidif's avatar zhangxiaoyu-zidif

fix binary check for glusterfs.go

parent 24042ce6
...@@ -238,7 +238,7 @@ func (b *glusterfsMounter) CanMount() error { ...@@ -238,7 +238,7 @@ func (b *glusterfsMounter) CanMount() error {
exe := b.plugin.host.GetExec(b.plugin.GetPluginName()) exe := b.plugin.host.GetExec(b.plugin.GetPluginName())
switch runtime.GOOS { switch runtime.GOOS {
case "linux": case "linux":
if _, err := exe.Run("/bin/ls", gciLinuxGlusterMountBinaryPath); err != nil { if _, err := exe.Run("test", "-x", gciLinuxGlusterMountBinaryPath); err != nil {
return fmt.Errorf("Required binary %s is missing", gciLinuxGlusterMountBinaryPath) return fmt.Errorf("Required binary %s is missing", gciLinuxGlusterMountBinaryPath)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment