Permalink
Browse files

1.1 Release

Minor bugfixes for key authentation and config file support.
  • Loading branch information...
tsightler committed Dec 5, 2017
1 parent 7cb98c4 commit cb0fb2781d368ac38ec10aeb08aff66325c18aa0
Showing with 20 additions and 8 deletions.
  1. +8 −2 sap-hana/hana-post-thaw.sh
  2. +8 −2 sap-hana/hana-pre-freeze.sh
  3. +4 −4 sap-hana/hana.conf
@@ -17,6 +17,7 @@
# Fixed bugs with log purging
# Added debug mode that can be run from the command line
# Optionally use config in separate file
# 1.1 - Dec 5, 2017 - Minor bugfixes for key auth and config file support
####################################################################
#
@@ -130,6 +131,8 @@ sysidsql="SELECT SYSTEM_ID from M_DATABASE;"
# It borrows heavily from an example on Stack Overflow
config_get() {
val="$(grep -E "^${1}=" -m 1 "${config}" 2>/dev/null | head -n 1 | cut -d '=' -f 2)"
tmp="${val%\"}"
val="${tmp#\"}"
printf -- "%s" "${val}"
}
@@ -190,7 +193,7 @@ done
read_sapservices
# If config file is found grab the options from there
if [ ! -z ${config} ]; then
if [ -r ${config} ]; then
username="$(config_get username)"
password="$(config_get password)"
keyprefix="$(config_get keyprefix)"
@@ -200,7 +203,10 @@ fi
# Setup the authentication options for hdbsql
if [ -z ${username} ]; then
[ $debug -ne 0 ] && echo "Using keystore based authentication"
if [ $debug -ne 0 ]; then
echo "Using keystore based authentication"
echo "Keyprefix: ${keyprefix}"
fi
hdbsqlopts="-a -x -j -U ${keyprefix}"
else
if [ $debug -ne 0 ]; then
@@ -17,6 +17,7 @@
# Fixed bugs with log purging
# Added debug mode that can be run from the command line
# Optionally use config in separate file (-c parameter)
# 1.1 - Dec 5, 2017 - Minor bugfixes for key auth and config file support
####################################################################
#
@@ -117,6 +118,8 @@ sysidsql="SELECT SYSTEM_ID from M_DATABASE;"
# It borrows heavily from an example on Stack Overflow
config_get() {
val="$(grep -E "^${1}=" -m 1 "${config}" 2>/dev/null | head -n 1 | cut -d '=' -f 2)"
tmp="${val%\"}"
val="${tmp#\"}"
printf -- "%s" "${val}"
}
@@ -184,15 +187,18 @@ done
read_sapservices
# If config file is found grab the options from there
if [ ! -z ${config} ]; then
if [ -r ${config} ]; then
username="$(config_get username)"
password="$(config_get password)"
keyprefix="$(config_get keyprefix)"
fi
# Setup the authentication options for hdbsql
if [ -z ${username} ]; then
[ $debug -ne 0 ] && echo "Using keystore based authentication"
if [ $debug -ne 0 ]; then
echo "Using keystore based authentication"
echo "Keyprefix: ${keyprefix}"
fi
hdbsqlopts="-a -x -j -U ${keyprefix}"
else
if [ $debug -ne 0 ]; then
@@ -4,9 +4,9 @@
username=""
password=""
# To use key based authenticate enter a key prefix here (default is HDB)
keyprefix=""
# To use key based authentication enter a key prefix here (default is HDB)
keyprefix="HDB"
# Log purge options
purgelogs=false
purgedays=3
purgelogs="false"
purgedays="3"

0 comments on commit cb0fb27

Please sign in to comment.