summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2009-12-01 18:13:21 +0530
committerVijay Bellur <vijay@gluster.com>2009-12-01 18:13:21 +0530
commitd63a382f7ffd5f9e019a3dd3b63ac35a9f05e8cc (patch)
tree909dd85aa2d0f3951f202c8d2288290b4e0632cf
parentdfb4e2b972f15dae06cde07689a1735d5a5c0ab6 (diff)
Changes to init script
-rw-r--r--init5
1 files changed, 4 insertions, 1 deletions
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
# <http://www.gnu.org/licenses/>.
#
+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 ()