modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.bat |
4
modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.sh |
43 ++++++++++
2 files changed, 47 insertions(+)
New commits:
commit 6309a893b284b0894de40c57de4e0b5fa554e4b3
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Oct 1 12:04:45 2013 -0400
Since rhq-installer.sh|bat moved to bin/internal we can no longer instruct
users to use it for the --encodepassword option. Add new
bin/rhq-encode-password.sh|bat scripts to fix this, providing a more
obvious script for doing the encoding and protecting bin/internal.
diff --git
a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.bat
b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.bat
new file mode 100644
index 0000000..ccd3841
--- /dev/null
+++
b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.bat
@@ -0,0 +1,4 @@
+@echo off
+set RHQ_SERVER_BIN_DIR_PATH=%~dp0
+%RHQ_SERVER_BIN_DIR_PATH%/internal/rhq-installer --encodepassword
+endlocal
diff --git
a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.sh
b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.sh
new file mode 100644
index 0000000..c4defb7
--- /dev/null
+++
b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-encode-password.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# ----------------------------------------------------------------------
+# Determine what specific platform we are running on.
+# Set some platform-specific variables.
+# ----------------------------------------------------------------------
+
+case "`uname`" in
+ CYGWIN*) _CYGWIN=true
+ ;;
+ Linux*) _LINUX=true
+ ;;
+ Darwin*) _DARWIN=true
+ ;;
+ SunOS*) _SOLARIS=true
+ ;;
+ AIX*) _AIX=true
+ ;;
+esac
+
+# only certain platforms support the -e argument for readlink
+if [ -n "${_LINUX}${_SOLARIS}${_CYGWIN}" ]; then
+ _READLINK_ARG="-e"
+fi
+
+# ----------------------------------------------------------------------
+# Determine the RHQ Server installation directory.
+# If RHQ_SERVER_HOME is not defined, we will assume we are running
+# directly from the server installation's bin/internal directory.
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_HOME" ]; then
+ _DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo
"$0"`
+ RHQ_SERVER_HOME=`dirname "$_DOLLARZERO"`/..
+else
+ if [ ! -d "$RHQ_SERVER_HOME" ]; then
+ echo "ERROR! RHQ_SERVER_HOME is not pointing to a valid directory"
+ echo "RHQ_SERVER_HOME: $RHQ_SERVER_HOME"
+ exit 1
+ fi
+fi
+
+$RHQ_SERVER_HOME/bin/internal/rhq-installer.sh --encodepassword
Show replies by date