* Added Clusterware (CRS) plugins (as a platform).
* Moved Serviceguard plugins to separate platform (+fixes) * Other fixes
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env ksh
|
||||
#******************************************************************************
|
||||
# @(#) build script for HC SD packages (uses 'swpackage')
|
||||
#******************************************************************************
|
||||
# @(#) 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
|
||||
#******************************************************************************
|
||||
|
||||
#******************************************************************************
|
||||
# Requires following build (dir) structures:
|
||||
#
|
||||
# build/hpux/<build_files>
|
||||
# build/hpux/build_hpux_depots.sh
|
||||
# opt/hc/bin/<hc_scripts>
|
||||
# opt/hc/lib/*/<hc_plugins>
|
||||
# etc/opt/hc/<hc_configs>
|
||||
# depots/
|
||||
#
|
||||
# Build order:
|
||||
# 1) Copy sources/scrips to the correct locations
|
||||
# 2) Copy pristine version of the build spec file to preserver %BUILD_DATE% (.psf)
|
||||
# 3) Copy template, build and installer script files into correct locations
|
||||
# 4) Execute build_hpux_depots.sh
|
||||
# 5) SD packages may be found in the 'depots' directory
|
||||
#******************************************************************************
|
||||
|
||||
BUILD_DATE="$(date +'%Y%m%d')"
|
||||
BUILD_PRETTY_DATE="$(date +'%Y.%m.%d')"
|
||||
BUILD_DIR="$(dirname $0)"
|
||||
|
||||
# clean up previous packages
|
||||
if [[ -d ../../depots ]]
|
||||
then
|
||||
rm -f ../../depots/* 2>/dev/null
|
||||
else
|
||||
mkdir -p ../../depots 2>/dev/null
|
||||
fi
|
||||
|
||||
# see if we have BUILD_DATE placeholder in PSF files
|
||||
find ${BUILD_DIR} -name "*.psf" | while read FILE
|
||||
do
|
||||
if (( $(grep -c '%BUILD_DATE%' ${FILE}) == 0 ))
|
||||
then
|
||||
print -u2 "ERROR: no %BUILD_DATE% placeholder in ${FILE}!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# replace BUILD_DATE placeholder in PSF files
|
||||
find ${BUILD_DIR} -name "*.psf" | while read FILE
|
||||
do
|
||||
perl -pi -e "s/%BUILD_DATE%/${BUILD_PRETTY_DATE}/g" ${FILE}
|
||||
done
|
||||
|
||||
# build hc_serviceguard_platform package
|
||||
cd ${BUILD_DIR}/hc_serviceguard_platform || exit 1
|
||||
swpackage -s hc_serviceguard_platform.psf -x media_type=tape -d ../../../depots/hc-serviceguard-platform-${BUILD_DATE}.sd
|
||||
cd - || exit 1
|
||||
|
||||
print "List of built packages:"
|
||||
ls -l ../../depots/*
|
||||
|
||||
# when installed on an ignite server: possible addition of depot registration here
|
||||
|
||||
exit 0
|
||||
|
||||
#******************************************************************************
|
||||
# END of script
|
||||
#******************************************************************************
|
||||
@@ -0,0 +1,102 @@
|
||||
# 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-SERVICEGUARD-PLATFORM
|
||||
title "The Health Checker (HC) for UNIX (Serviceguard plugins)"
|
||||
os_name HP-UX
|
||||
revision %BUILD_DATE%
|
||||
architecture HP-UX_B.11_32/64
|
||||
machine_type ia64*
|
||||
vendor_tag KUDOS
|
||||
contents HC-SERVICEGUARD-PLATFORM,r=,a=,v=
|
||||
end
|
||||
|
||||
# Product definitions:
|
||||
product
|
||||
tag HC-SERVICEGUARD-PLATFORM
|
||||
revision %BUILD_DATE%
|
||||
category tools
|
||||
category_title Tools
|
||||
title "The Health Checker (HC) for UNIX (Serviceguard plugins)"
|
||||
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.
|
||||
This is the OS/platform plugin package"
|
||||
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_serviceguard_platform.postinstall
|
||||
postremove scripts/hc_serviceguard_platform.postremove
|
||||
|
||||
# Fileset definitions:
|
||||
fileset
|
||||
tag plugins
|
||||
title UX Health Checker (Serviceguard plugins)
|
||||
is_kernel false
|
||||
is_locatable false
|
||||
is_reboot false
|
||||
is_sparse false
|
||||
is_patch false
|
||||
prerequisite HC-HPUX-MAIN
|
||||
|
||||
file_permissions -u 0222 -o root -g sys
|
||||
|
||||
directory ../../../opt/hc/lib/platform/serviceguard=/opt/hc/lib/platform/serviceguard
|
||||
file -m 755 check_serviceguard_package_status.sh
|
||||
file -m 755 check_serviceguard_package_config.sh
|
||||
file -m 755 check_serviceguard_cluster_status.sh
|
||||
file -m 755 check_serviceguard_cluster_config.sh
|
||||
file -m 755 check_serviceguard_qs_status.sh
|
||||
end
|
||||
|
||||
fileset
|
||||
tag config
|
||||
title UX Health Checker (Serviceguard plugins: configuration)
|
||||
is_kernel false
|
||||
is_locatable false
|
||||
is_reboot false
|
||||
is_sparse false
|
||||
is_patch false
|
||||
prerequisite HC-SERVICEGUARD-PLATFORM.plugins
|
||||
|
||||
file_permissions -u 0222 -o root -g sys
|
||||
|
||||
directory ../../../etc/opt/hc/=/etc/opt/hc
|
||||
file -m 644 check_serviceguard_package_status.conf.dist
|
||||
file -m 644 check_serviceguard_package_config.conf.dist
|
||||
file -m 644 check_serviceguard_cluster_status.conf.dist
|
||||
file -m 644 check_serviceguard_cluster_config.conf.dist
|
||||
end
|
||||
|
||||
fileset
|
||||
tag templates
|
||||
title UX Health Checker (OS/Platform plugins: templates)
|
||||
is_kernel false
|
||||
is_locatable false
|
||||
is_reboot false
|
||||
is_sparse false
|
||||
is_patch false
|
||||
prerequisite HC-SERVICEGUARD-PLATFORM.plugins
|
||||
|
||||
file_permissions -u 0222 -o root -g sys
|
||||
|
||||
directory ../../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates
|
||||
end
|
||||
end
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env ksh
|
||||
#******************************************************************************
|
||||
# @(#) post-install script for HC-SERVICEGUARD-PLATFORM 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 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 ..."
|
||||
|
||||
# refresh symbolic FPATH links
|
||||
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
|
||||
#******************************************************************************
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env ksh
|
||||
#******************************************************************************
|
||||
# @(#) post-remove script for HC-PLATFORM 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 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-remove script ..."
|
||||
|
||||
# refresh symbolic FPATH links
|
||||
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-remove script"
|
||||
|
||||
exit 0
|
||||
|
||||
#******************************************************************************
|
||||
# END of script
|
||||
#******************************************************************************
|
||||
Reference in New Issue
Block a user