fix binary check for glusterfs.go

pull/6/head
zhangxiaoyu-zidif 2017-11-28 19:02:56 +08:00
parent 24042ce6e7
commit cbf0945afc
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ func (b *glusterfsMounter) CanMount() error {
exe := b.plugin.host.GetExec(b.plugin.GetPluginName())
switch runtime.GOOS {
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)
}
}