summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gateway.scripts
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-08-22 20:44:12 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-08-22 20:45:24 +0530
commitadbf8e51dd5d2eadd98823d42f8842d9bd6910af (patch)
treee950de2af26b63f63de093bc4b0d4f7b07618776 /src/com.gluster.storage.management.gateway.scripts
parent43a25247aa43493a7598f4d4779e7cc1f1a64368 (diff)
Modified to make sure that the script can be called from any directory
Diffstat (limited to 'src/com.gluster.storage.management.gateway.scripts')
-rwxr-xr-xsrc/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh b/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh
index 4edf0ffd..6c7ac998 100755
--- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh
+++ b/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh
@@ -10,12 +10,17 @@ if [ $# -ne 1 ]; then
exit ${USAGE_ERR}
fi
+CURR_DIR=${PWD}
+SCRIPT_PATH=`readlink -f ${0}`
+GLUSTERMG_DIR=`dirname ${SCRIPT_PATH}`
+
# Main action body
+cd ${GLUSTERMG_DIR}
cd ..
for FILE in WEB-INF/lib/*.jar
do
export CLASSPATH=${CLASSPATH}:${PWD}/${FILE}
done
export CLASSPATH=${PWD}/WEB-INF/classes:${CLASSPATH}
-cd -
+cd ${CURR_DIR}
java com.gluster.storage.management.gateway.utils.PasswordManager reset ${1}