Whamcloud - gitweb
LU-16751 conf: remove outdated config files
[fs/lustre-release.git] / lustre / tests / rpc.sh
index a5831c8..2acc2d1 100755 (executable)
@@ -1,21 +1,20 @@
 #!/bin/bash
-export PATH=`dirname $0`/../utils:$PATH
-NAME=${NAME:-local}
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname "$0")/..}
 
-if [ ! -f $LUSTRE/tests/rpc.sh ]; then
-    LUSTRE=$(cd $(dirname $(which $0))/..; echo $PWD)
+if [[ ! -f "$LUSTRE/tests/rpc.sh" ]]; then
+       FILE_PATH=$(which "$0")
+       DIRECTORY=$(dirname "$FILE_PATH")
+       LUSTRE=$(dirname "$DIRECTORY")
 fi
 
-. $LUSTRE/tests/test-framework.sh
+. "$LUSTRE/tests/test-framework.sh"
 RPC_MODE=true init_test_env
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 # Reset the trap on ERR set by the framework.  Noticing this failure is the
 # framework's job.
 trap - ERR
 
-log "$HOSTNAME: executing $@"
+log "$HOSTNAME: executing $*"
 # Execute the command
 "$@"