* Added Clusterware (CRS) plugins (as a platform).

* Moved Serviceguard plugins to separate platform (+fixes)
* Other fixes
This commit is contained in:
Patrick Van der Veken
2019-04-24 14:19:02 +02:00
parent a4e1b4b954
commit 05dd91edc4
49 changed files with 1584 additions and 1126 deletions
+33 -1
View File
@@ -30,7 +30,7 @@
# RETURNS: 0
function version_include_data
{
typeset _VERSION="2019-03-16" # YYYY-MM-DD
typeset _VERSION="2019-04-20" # YYYY-MM-DD
print "INFO: $0: ${_VERSION#version_*}"
@@ -80,6 +80,38 @@ print -R "${1%?}" 2>/dev/null
return 0
}
# -----------------------------------------------------------------------------
# @(#) FUNCTION: data_get_length_string()
# DOES: get length of a string
# EXPECTS: string
# OUTPUTS: length of string [integer]
# RETURNS: 0
# REQUIRES: n/a
function data_get_length_string
{
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set "${DEBUG_OPTS}"
print -R "${#1}" 2>/dev/null
return 0
}
# -----------------------------------------------------------------------------
# @(#) FUNCTION: data_get_substring()
# DOES: get a substring of a string
# EXPECTS: $1=string; $2=length of substring [integer]
# OUTPUTS: substring [string]
# RETURNS: 0
# REQUIRES: n/a
function data_get_substring
{
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set "${DEBUG_OPTS}"
print -R "${1}" | cut -f1-${2} 2>/dev/null
return 0
}
# -----------------------------------------------------------------------------
# @(#) FUNCTION: data_contains_string()
# DOES: checks if a string (haystack) contains a substring (needle).
+3 -1
View File
@@ -30,7 +30,7 @@
function notify_mail
{
# ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2019-03-16" # YYYY-MM-DD
typeset _VERSION="2019-04-20" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX,HP-UX,Linux" # uname -s match
# ------------------------- CONFIGURATION ends here ---------------------------
@@ -130,6 +130,7 @@ fi
eval "cat << __EOT
$(sed 's/[\$`]/\\&/g;s/<## @\([^ ]*\) ##>/${\1}/g' <${_MAIL_HEADER_TPL})
__EOT" >>${_TMP1_MAIL_FILE}
print "" >>${_TMP1_MAIL_FILE}
# create body part (from $HC_MSG_VAR)
print "${HC_MSG_VAR}" | while IFS=${MSG_SEP} read _MAIL_MSG_STC _ _MAIL_MSG_TEXT _MAIL_MSG_CUR_VAL _MAIL_MSG_EXP_VAL
@@ -175,6 +176,7 @@ done
eval "cat << __EOT
$(sed 's/[\$`]/\\&/g;s/<## @\([^ ]*\) ##>/${\1}/g' <${_MAIL_BODY_TPL})
__EOT" >>${_TMP1_MAIL_FILE}
print "" >>${_TMP1_MAIL_FILE}
# HC STDOUT log? (drop the .$$ bit)
_MAIL_STDOUT_LOG="${EVENTS_DIR}/${DIR_PREFIX}/${_MAIL_FAIL_ID}/${_HC_STDOUT_LOG_SHORT%.*}"