diff options
| author | Shireesh Anjal <shireesh@gluster.com> | 2011-08-22 20:44:12 +0530 |
|---|---|---|
| committer | Shireesh Anjal <shireesh@gluster.com> | 2011-08-22 20:45:24 +0530 |
| commit | adbf8e51dd5d2eadd98823d42f8842d9bd6910af (patch) | |
| tree | e950de2af26b63f63de093bc4b0d4f7b07618776 /src/com.gluster.storage.management.gateway.scripts | |
| parent | 43a25247aa43493a7598f4d4779e7cc1f1a64368 (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-x | src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh | 7 |
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} |
