]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/ceph-disk.sh: fix for SUSE
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 24 Jun 2014 17:54:17 +0000 (19:54 +0200)
committerLoic Dachary <ldachary@redhat.com>
Mon, 22 Dec 2014 21:54:20 +0000 (22:54 +0100)
On SUSE 'which' returns always the full path of (shell) commands and
not e.g. './ceph-conf' as on Debian. Add check also for full
path returned by which.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 39530536ff923b91899f6303507c283b78040a20)

src/test/ceph-disk.sh

index 93e5f3bc01592d9e99e9f2595ac8cb9c18f2bd7f..7aff8e69c520bb964791692d58ebcf54ef68db5f 100755 (executable)
@@ -84,7 +84,7 @@ function kill_daemons() {
 function command_fixture() {
     local command=$1
 
-    [ $(which $command) = ./$command ] || return 1
+    [ $(which $command) = ./$command ] || [ $(which $command) = $(pwd)/$command ] || return 1
 
     cat > $DIR/$command <<EOF
 #!/bin/bash