From d63a382f7ffd5f9e019a3dd3b63ac35a9f05e8cc Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 1 Dec 2009 18:13:21 +0530 Subject: Changes to init script --- init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'init') diff --git a/init b/init index 97c6121..e857be9 100644 --- a/init +++ b/init @@ -16,6 +16,7 @@ # along with this program. If not, see # . # +set -u function ok () { @@ -47,6 +48,7 @@ exit fi BUGID=$(pwd | xargs dirname | xargs basename) +STARTDIR=$(pwd) LOGDIR=$PWD/logs/$VERSION GLUSTERFSDIR=`dirname $GLUSTERFS` SPECDIR=$PWD/spec_files @@ -87,13 +89,14 @@ function start_glusterfs () function stop_glusterfs () { + cd $STARTDIR # Kill the clients for i in `ls -d $MOUNTDIR/client*` do sudo umount $i 2>/dev/null done # Kill the servers later - sudo pkill -f "$glusterfs/glusterfsd --run-id regr-$BUGID-$VERSION-s" + sudo pkill -f "$GLUSTERFSDIR/glusterfsd --run-id regr-$BUGID-$VERSION-s" } function cleanup_dir () -- cgit