This commit is contained in:
patvdv
2017-09-02 23:27:01 +02:00
parent b23126799b
commit 2775da5f44
175 changed files with 17098 additions and 2 deletions
+118
View File
@@ -0,0 +1,118 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-HPUX
title "The Health Checker (HC) for UNIX"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-HPUX-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-HPUX-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc."
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_hpux.postinstall
postremove scripts/hc_hpux.postremove
# Fileset definitions:
fileset
tag scripts
title UX Health Checker (scripts)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
file_permissions -u 0222 -o root -g sys
directory ../../sources/bin=/opt/hc/bin
file -m 755 check_health.sh
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 include_core.sh
file -m 755 include_data.sh
file -m 755 include_os.sh
end
fileset
tag core_plugins
title UX Health Checker (core plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_mail.sh
end
fileset
tag config
title UX Health Checker (configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN.scripts
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core=/etc/opt/hc/core
file -m 644 check_health.conf.dist
directory ../../sources/etc=/etc/opt/hc
file -m 644 check_host.conf.dist
end
fileset
tag templates
title UX Health Checker (templates)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN.scripts
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core/templates=/etc/opt/hc/core/templates
file -m 644 mail_info.tpl
file -m 644 mail_header.tpl
file -m 644 mail_body.tpl
file -m 644 mail_footer.tpl
end
end
@@ -0,0 +1,96 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-HPUX SD package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of VAR dir
HC_VAR_DIR="/var/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# create ETC DIR
if [[ ! -d ${HC_ETC_DIR} ]]
then
mkdir -p ${HC_ETC_DIR} >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_ETC_DIR}"
exit 1
}
chmod 755 ${HC_ETC_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_ETC_DIR}"
fi
if [[ ! -d ${HC_ETC_DIR}/core ]]
then
mkdir -p ${HC_ETC_DIR}/core >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_ETC_DIR}/core"
exit 1
}
chmod 755 ${HC_ETC_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_ETC_DIR}/core"
fi
# copy main config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
then
cp -p ${HC_ETC_DIR}/core/check_health.conf.dist ${HC_ETC_DIR}/core/check_health.conf >/dev/null || \
{
print -u2 "ERROR: could not copy main config file in ${HC_ETC_DIR}/core"
exit 1
}
fi
# copy host check config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]]
then
cp -p ${HC_ETC_DIR}/check_host.conf.dist ${HC_ETC_DIR}/check_host.conf >/dev/null || \
{
print -u2 "ERROR: could not copy host check config file in ${HC_ETC_DIR}"
exit 1
}
fi
# create VAR DIR
if [[ ! -d ${HC_VAR_DIR} ]]
then
mkdir -p ${HC_VAR_DIR} >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_VAR_DIR}"
exit 1
}
chmod 755 ${HC_VAR_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_VAR_DIR}"
fi
# refresh symbolic FPATH links for core plugins
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************
@@ -0,0 +1,65 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-HPUX SD package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of VAR dir
HC_VAR_DIR="/var/opt/hc"
# location of MAIN dir
HC_MAIN_DIR="/opt/hc"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# remove ETC DIR (only .dist files)
if [[ -d ${HC_ETC_DIR} ]]
then
rm -rf ${HC_ETC_DIR}/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}"
fi
if [[ -d ${HC_ETC_DIR}/core ]]
then
rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core"
fi
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers"
fi
# remove VAR DIR (temporary state only)
if [[ -d ${HC_VAR_DIR} ]]
then
rm -rf ${HC_VAR_DIR}/state/temporary >/dev/null || \
print -u2 "WARN: could not remove directory ${HC_VAR_DIR}/state/temporary"
fi
# remove MAIN DIR
if [[ -d ${HC_MAIN_DIR} ]]
then
rm -rf ${HC_MAIN_DIR} >/dev/null || \
print -u2 "WARN: could not remove directory ${HC_VAR_DIR}"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************