[Ocfs2-test-devel] [PATCH 3/3] Ocfs2-test: A minor enhancement for o2tf.sh
Tristan Ye
tristan.ye at oracle.com
Fri Sep 11 02:13:40 PDT 2009
To specify the path for config.sh in a more accurate way
in case we didn't execute the testing from working directory.
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
programs/python_common/o2tf.sh | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/programs/python_common/o2tf.sh b/programs/python_common/o2tf.sh
index d912a9b..cabfe3c 100755
--- a/programs/python_common/o2tf.sh
+++ b/programs/python_common/o2tf.sh
@@ -22,10 +22,13 @@
################################################################################
# Global Variables
################################################################################
-PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools
-export PATH=$PATH:.
-. ./config.sh
+if [ -f `dirname ${0}`/config.sh ]; then
+ . `dirname ${0}`/config.sh
+fi
+
+PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools
+export PATH=$PATH:${BINDIR}
MKFS_BIN="`which sudo` -u root `which mkfs.ocfs2`"
MOUNT_BIN="`which sudo` -u root `which mount`"
--
1.5.5
More information about the Ocfs2-test-devel
mailing list