Added exclude_filesets option in check_hpux_patch_version()

This commit is contained in:
Patrick Van der Veken 2018-10-22 11:47:33 +02:00
parent c52798ceef
commit c36c07eb2d
3 changed files with 13 additions and 3 deletions

View File

@ -23,6 +23,10 @@ required_patches=""
# [default: yes]
check_filesets=yes
# list of filesets to exclude from the check (comma-separated list)
# [default: none]
exclude_filesets=""
#******************************************************************************
# End of FILE

View File

@ -92,6 +92,7 @@ else
# convert commas and strip quotes
_OVPA_DAEMONS=$(data_comma2space $(data_dequote "${_OVPA_DAEMONS}"))
fi
log "will check daemons: ${_OVPA_DAEMONS}"
_CFG_HEALTHY=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'log_healthy')
case "${_CFG_HEALTHY}" in
yes|YES|Yes)
@ -128,7 +129,6 @@ else
fi
# do OVPA status checks
log "checking daemons: ${_OVPA_DAEMONS} ..."
for _OVPA_DAEMON in ${_OVPA_DAEMONS}
do
# anchored grep here!

View File

@ -90,6 +90,8 @@ then
# default
_CHECK_FILESETS="yes"
fi
_EXCLUDE_FILESETS=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'exclude_filesets')
[[ -n "${_EXCLUDE_FILESETS}" ]] && log "excluding filesets: $(print ${_EXCLUDE_FILESETS})"
_CFG_HEALTHY=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'log_healthy')
case "${_CFG_HEALTHY}" in
yes|YES|Yes)
@ -228,8 +230,12 @@ then
while read _FILESET_LINE
do
_FILESET=$(print "${_FILESET_LINE}" | awk '{print $1}' 2>/dev/null)
# check exclude(s)
if [[ "${_EXCLUDE_FILESETS#*${_FILESET}}" = "${_EXCLUDE_FILESETS}" ]]
then
_MSG="fileset ${_FILESET} is not in a configured state"
log_hc "$0" 1 "${_MSG}"
fi
done
else
_MSG="unable to run command: {${_SWLIST_BIN}}"