Repository: incubator-ranger Updated Branches: refs/heads/master 54caee221 -> 6de1bbc8f
RANGER-503 : Fix Ranger Admin script for SUSE-11 Signed-off-by: sneethiraj <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/6de1bbc8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/6de1bbc8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/6de1bbc8 Branch: refs/heads/master Commit: 6de1bbc8f6382a3fa774205ddbb4b9d36dec769e Parents: 54caee2 Author: Gautam Borad <[email protected]> Authored: Fri May 22 18:01:23 2015 +0530 Committer: sneethiraj <[email protected]> Committed: Fri May 22 08:49:17 2015 -0400 ---------------------------------------------------------------------- embeddedwebserver/scripts/ranger-admin-services.sh | 10 +++++----- kms/scripts/ranger-kms | 10 +++++----- unixauthservice/scripts/ranger-usersync-services.sh | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6de1bbc8/embeddedwebserver/scripts/ranger-admin-services.sh ---------------------------------------------------------------------- diff --git a/embeddedwebserver/scripts/ranger-admin-services.sh b/embeddedwebserver/scripts/ranger-admin-services.sh index 73502a1..6931dbf 100755 --- a/embeddedwebserver/scripts/ranger-admin-services.sh +++ b/embeddedwebserver/scripts/ranger-admin-services.sh @@ -21,7 +21,7 @@ if [[ -z $1 ]]; then exit; fi action=$1 - +action=`echo $action | tr '[:lower:]' '[:upper:]'` realScriptPath=`readlink -f $0` realScriptDir=`dirname $realScriptPath` XAPOLICYMGR_DIR=`(cd $realScriptDir/..; pwd)` @@ -63,19 +63,19 @@ stop(){ } -if [ ${action^^} == "START" ]; then +if [ "${action}" == "START" ]; then start; exit; -elif [ ${action^^} == "STOP" ]; then +elif [ "${action}" == "STOP" ]; then stop; exit; -elif [ ${action^^} == "RESTART" ]; then +elif [ "${action}" == "RESTART" ]; then echo "Restarting Apache Ranger Admin" stop; sleep 2 start; exit; -elif [ ${action^^} == "VERSION" ]; then +elif [ "${action}" == "VERSION" ]; then cd ${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/lib java -cp ranger-util-*.jar org.apache.ranger.common.RangerVersionInfo exit; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6de1bbc8/kms/scripts/ranger-kms ---------------------------------------------------------------------- diff --git a/kms/scripts/ranger-kms b/kms/scripts/ranger-kms index cb31860..f0fa1b4 100755 --- a/kms/scripts/ranger-kms +++ b/kms/scripts/ranger-kms @@ -22,7 +22,7 @@ then exit; fi action=$1 - +action=`echo $action | tr '[:lower:]' '[:upper:]'` realScriptPath=`readlink -f $0` realScriptDir=`dirname $realScriptPath` RANGER_KMS_DIR=`(cd $realScriptDir; pwd)` @@ -74,16 +74,16 @@ KMS_CONF_DIR=${RANGER_KMS_EWS_DIR}/webapp/WEB-INF/classes/conf JAVA_OPTS="${JAVA_OPTS} -Dcatalina.base=${RANGER_KMS_EWS_DIR} -Dkms.config.dir=${KMS_CONF_DIR} -Dkms.log.dir=${TOMCAT_LOG_DIR} -cp ${RANGER_KMS_EWS_CONF_DIR}:${RANGER_KMS_EWS_LIB_DIR}/*:${RANGER_KMS_EWS_DIR}/webapp/lib/*:${JAVA_HOME}/lib/* " -if [ "${action^^}" == "START" ]; then +if [ "${action}" == "START" ]; then echo "+ java -D${PROC_NAME} ${JAVA_OPTS} ${START_CLASS_NAME} ${KMS_CONFIG_FILENAME} " java -D${PROC_NAME} ${JAVA_OPTS} ${START_CLASS_NAME} ${KMS_CONFIG_FILENAME} > ${TOMCAT_LOG_FILE} 2>&1 & echo "Apache Ranger KMS has started." exit -elif [ "${action^^}" == "STOP" ]; then +elif [ "${action}" == "STOP" ]; then java ${JAVA_OPTS} ${STOP_CLASS_NAME} ${KMS_CONFIG_FILENAME} > ${TOMCAT_STOP_LOG_FILE} 2>&1 echo "Apache Ranger KMS has been stopped." exit -elif [ "${action^^}" == "RESTART" ]; then +elif [ "${action}" == "RESTART" ]; then echo "Restarting Apache Ranger KMS" java ${JAVA_OPTS} ${STOP_CLASS_NAME} ${KMS_CONFIG_FILENAME} > ${TOMCAT_STOP_LOG_FILE} 2>&1 echo "Apache Ranger KMS has been stopped." @@ -91,7 +91,7 @@ elif [ "${action^^}" == "RESTART" ]; then java -D${PROC_NAME} ${JAVA_OPTS} ${START_CLASS_NAME} ${KMS_CONFIG_FILENAME} > ${TOMCAT_LOG_FILE} 2>&1 & echo "Apache Ranger KMS has started successfully." exit -elif [ "${action^^}" == "VERSION" ]; then +elif [ "${action}" == "VERSION" ]; then ( cd ${RANGER_KMS_LIB_DIR} ; java -cp ranger-util-*.jar org.apache.ranger.common.RangerVersionInfo ) exit else http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6de1bbc8/unixauthservice/scripts/ranger-usersync-services.sh ---------------------------------------------------------------------- diff --git a/unixauthservice/scripts/ranger-usersync-services.sh b/unixauthservice/scripts/ranger-usersync-services.sh index 3ec1999..9099f7d 100644 --- a/unixauthservice/scripts/ranger-usersync-services.sh +++ b/unixauthservice/scripts/ranger-usersync-services.sh @@ -21,7 +21,7 @@ if [[ -z $1 ]]; then exit; fi action=$1 - +action=`echo $action | tr '[:lower:]' '[:upper:]'` realScriptPath=`readlink -f $0` realScriptDir=`dirname $realScriptPath` cd $realScriptDir @@ -30,7 +30,7 @@ cdir=`pwd` pidf=/var/run/ranger/usersync.pid -if [ ${action^^} == "START" ]; then +if [ "${action}" == "START" ]; then #Export JAVA_HOME . ${cdir}/conf/java_home.sh @@ -76,7 +76,7 @@ if [ ${action^^} == "START" ]; then fi exit; -elif [ ${action^^} == "STOP" ]; then +elif [ "${action}" == "STOP" ]; then if [ -f $pidf ]; then pidf=/var/run/ranger/usersync.pid @@ -90,13 +90,13 @@ elif [ ${action^^} == "STOP" ]; then exit; -elif [ ${action^^} == "RESTART" ]; then +elif [ "${action}" == "RESTART" ]; then echo "Stopping Ranger Usersync" ${cdir}/ranger-usersync-services.sh stop echo "Starting Apache Ranger Usersync" ${cdir}/ranger-usersync-services.sh start exit; -elif [ ${action^^} == "VERSION" ]; then +elif [ "${action}" == "VERSION" ]; then cd ${cdir}/lib java -cp ranger-util-*.jar org.apache.ranger.common.RangerVersionInfo exit
