]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/ceph-disk.sh: fix for SUSE 2021/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 24 Jun 2014 17:54:17 +0000 (19:54 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 25 Jun 2014 20:23:28 +0000 (22:23 +0200)
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>
src/test/ceph-disk.sh

index 3e95bf911a5a3e0c5389a0e3e15aa58f3c2b5eef..91e99ec4c9c38514f9e833180cd13f4bf694a1fe 100755 (executable)
@@ -83,7 +83,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