Update build scripts & files
This commit is contained in:
parent
5de5f4404f
commit
8afe2e3383
@ -17,10 +17,11 @@
|
|||||||
#******************************************************************************
|
#******************************************************************************
|
||||||
# Requires following build (dir) structures:
|
# Requires following build (dir) structures:
|
||||||
#
|
#
|
||||||
# build/<build_files>
|
# build/<platform>/<build_files>
|
||||||
# build/build_hpux_depots.sh
|
# build/build_hpux_depots.sh
|
||||||
# sources/bin/<hc_scripts>
|
# opt/hc/bin/<hc_scripts>
|
||||||
# sources/lib/*/<hc_plugins>
|
# opt/hc/lib/*/<hc_plugins>
|
||||||
|
# etc/opt/hc/<hc_configs>
|
||||||
# depots/
|
# depots/
|
||||||
#
|
#
|
||||||
# Build order:
|
# Build order:
|
||||||
@ -36,80 +37,76 @@ BUILD_PRETTY_DATE="$(date +'%Y.%m.%d')"
|
|||||||
BUILD_DIR="$(dirname $0)"
|
BUILD_DIR="$(dirname $0)"
|
||||||
|
|
||||||
# clean up previous packages
|
# clean up previous packages
|
||||||
rm -f ${BUILD_DIR}/depots/* >/dev/null
|
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
|
# see if we have BUILD_DATE placeholder in PSF files
|
||||||
find ${BUILD_DIR} -name "*.psf" | while read FILE
|
find ${BUILD_DIR} -name "*.psf" | while read FILE
|
||||||
do
|
do
|
||||||
if (( $(grep -c '%BUILD_DATE%' ${FILE}) == 0 ))
|
if (( $(grep -c '%BUILD_DATE%' ${FILE}) == 0 ))
|
||||||
then
|
then
|
||||||
print -u2 "ERROR: no %BUILD_DATE% placeholder in ${FILE}!"
|
print -u2 "ERROR: no %BUILD_DATE% placeholder in ${FILE}!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# replace BUILD_DATE placeholder in PSF files
|
# replace BUILD_DATE placeholder in PSF files
|
||||||
find ${BUILD_DIR} -name "*.psf" | while read FILE
|
find ${BUILD_DIR} -name "*.psf" | while read FILE
|
||||||
do
|
do
|
||||||
perl -pi -e "s/%BUILD_DATE%/${BUILD_PRETTY_DATE}/g" ${FILE}
|
perl -pi -e "s/%BUILD_DATE%/${BUILD_PRETTY_DATE}/g" ${FILE}
|
||||||
done
|
done
|
||||||
|
|
||||||
# build hc_hpux package
|
# build hc_hpux package
|
||||||
cd ${BUILD_DIR}/hc_hpux/
|
cd ${BUILD_DIR}/hc_hpux/ || exit 1
|
||||||
swpackage -s hc_hpux.psf -x media_type=tape -d ../../depots/hc_hpux-${BUILD_DATE}.sd
|
swpackage -s hc_hpux.psf -x media_type=tape -d ../../../depots/hc_hpux-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_hpux.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_hpux_platform package
|
# build hc_hpux_platform package
|
||||||
cd ${BUILD_DIR}/hc_hpux_platform
|
cd ${BUILD_DIR}/hc_hpux_platform || exit 1
|
||||||
swpackage -s hc_hpux_platform.psf -x media_type=tape -d ../../depots/hc_hpux_platform-${BUILD_DATE}.sd
|
swpackage -s hc_hpux_platform.psf -x media_type=tape -d ../../../depots/hc_hpux_platform-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_hpux_platform.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_display_csv package
|
# build hc_display_csv package
|
||||||
cd ${BUILD_DIR}/hc_display_csv
|
cd ${BUILD_DIR}/hc_display_csv || exit 1
|
||||||
swpackage -s hc_display_csv.psf -x media_type=tape -d ../../depots/hc_display_csv-${BUILD_DATE}.sd
|
swpackage -s hc_display_csv.psf -x media_type=tape -d ../../../depots/hc_display_csv-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_display_csv.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_display_init package
|
# build hc_display_init package
|
||||||
cd ${BUILD_DIR}/hc_display_init
|
cd ${BUILD_DIR}/hc_display_init || exit 1
|
||||||
swpackage -s hc_display_init.psf -x media_type=tape -d ../../depots/hc_display_init-${BUILD_DATE}.sd
|
swpackage -s hc_display_init.psf -x media_type=tape -d ../../../depots/hc_display_init-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_display_init.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_display_json package
|
# build hc_display_json package
|
||||||
cd ${BUILD_DIR}/hc_display_json
|
cd ${BUILD_DIR}/hc_display_json || exit 1
|
||||||
swpackage -s hc_display_json.psf -x media_type=tape -d ../../depots/hc_display_json-${BUILD_DATE}.sd
|
swpackage -s hc_display_json.psf -x media_type=tape -d ../../../depots/hc_display_json-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_display_json.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_display_terse package
|
# build hc_display_terse package
|
||||||
cd ${BUILD_DIR}/hc_display_terse
|
cd ${BUILD_DIR}/hc_display_terse || exit 1
|
||||||
swpackage -s hc_display_terse.psf -x media_type=tape -d ../../depots/hc_display_terse-${BUILD_DATE}.sd
|
swpackage -s hc_display_terse.psf -x media_type=tape -d ../../../depots/hc_display_terse-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_display_terse.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_display_zenoss package
|
# build hc_display_zenoss package
|
||||||
cd ${BUILD_DIR}/hc_display_zenoss
|
cd ${BUILD_DIR}/hc_display_zenoss || exit 1
|
||||||
swpackage -s hc_display_zenoss.psf -x media_type=tape -d ../../depots/hc_display_zenoss-${BUILD_DATE}.sd
|
swpackage -s hc_display_zenoss.psf -x media_type=tape -d ../../../depots/hc_display_zenoss-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_display_zenoss.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_notify_sms package
|
# build hc_notify_sms package
|
||||||
cd ${BUILD_DIR}/hc_notify_sms
|
cd ${BUILD_DIR}/hc_notify_sms || exit 1
|
||||||
swpackage -s hc_notify_sms.psf -x media_type=tape -d ../../depots/hc_notify_sms-${BUILD_DATE}.sd
|
swpackage -s hc_notify_sms.psf -x media_type=tape -d ../../../depots/hc_notify_sms-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_notify_sms.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
# build hc_notify_eif package
|
# build hc_notify_eif package
|
||||||
cd ${BUILD_DIR}/hc_notify_eif
|
cd ${BUILD_DIR}/hc_notify_eif || exit 1
|
||||||
swpackage -s hc_notify_eif.psf -x media_type=tape -d ../../depots/hc_notify_eif-${BUILD_DATE}.sd
|
swpackage -s hc_notify_eif.psf -x media_type=tape -d ../../../depots/hc_notify_eif-${BUILD_DATE}.sd
|
||||||
swpackage -s hc_notify_eif.psf @ /var/opt/depot/kudos
|
cd - || exit 1
|
||||||
cd -
|
|
||||||
|
|
||||||
print "List of built packages:"
|
print "List of built packages:"
|
||||||
ls -l ${BUILD_DIR}/../depots/*
|
ls -l ../../depots/*
|
||||||
|
|
||||||
# when installed on an ignite server: possible addition of depot registration here
|
# when installed on an ignite server: possible addition of depot registration here
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ This is the core CSV display plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 display_csv.sh
|
file -m 755 display_csv.sh
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ This is the core INIT display plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 display_init.sh
|
file -m 755 display_init.sh
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ This is the core JSON display plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 display_json.sh
|
file -m 755 display_json.sh
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ This is the core TERSE display plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 display_terse.sh
|
file -m 755 display_terse.sh
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ This is the core ZENOSS display plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 display_zenoss.sh
|
file -m 755 display_zenoss.sh
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -56,9 +56,9 @@ system mounts, process checks, file consistency etc."
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/bin=/opt/hc/bin
|
directory ../../../opt/hc/bin=/opt/hc/bin
|
||||||
file -m 755 check_health.sh
|
file -m 755 check_health.sh
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 include_core.sh
|
file -m 755 include_core.sh
|
||||||
file -m 755 include_data.sh
|
file -m 755 include_data.sh
|
||||||
file -m 755 include_os.sh
|
file -m 755 include_os.sh
|
||||||
@ -75,7 +75,7 @@ system mounts, process checks, file consistency etc."
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 notify_mail.sh
|
file -m 755 notify_mail.sh
|
||||||
file -m 755 report_std.sh
|
file -m 755 report_std.sh
|
||||||
end
|
end
|
||||||
@ -92,9 +92,9 @@ system mounts, process checks, file consistency etc."
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../etc/opt/hc/core=/etc/opt/hc/core
|
directory ../../../etc/opt/hc/core=/etc/opt/hc/core
|
||||||
file -m 644 check_health.conf.dist
|
file -m 644 check_health.conf.dist
|
||||||
directory ../../etc/opt/hc=/etc/opt/hc
|
directory ../../../etc/opt/hc=/etc/opt/hc
|
||||||
file -m 644 check_host.conf.dist
|
file -m 644 check_host.conf.dist
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ system mounts, process checks, file consistency etc."
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates
|
directory ../../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates
|
||||||
file -m 644 mail_info.tpl
|
file -m 644 mail_info.tpl
|
||||||
file -m 644 mail_header.tpl
|
file -m 644 mail_header.tpl
|
||||||
file -m 644 mail_body.tpl
|
file -m 644 mail_body.tpl
|
||||||
|
@ -58,7 +58,7 @@ This is the OS/platform plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/platform/hp-ux=/opt/hc/lib/platform/hp-ux
|
directory ../../../opt/hc/lib/platform/hp-ux=/opt/hc/lib/platform/hp-ux
|
||||||
file -m 755 check_hpux_autopath.sh
|
file -m 755 check_hpux_autopath.sh
|
||||||
file -m 755 check_hpux_cdsf_cluster.sh
|
file -m 755 check_hpux_cdsf_cluster.sh
|
||||||
file -m 755 check_hpux_cron_status.sh
|
file -m 755 check_hpux_cron_status.sh
|
||||||
@ -106,7 +106,7 @@ This is the OS/platform plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../etc/opt/hc/=/etc/opt/hc
|
directory ../../../etc/opt/hc/=/etc/opt/hc
|
||||||
file -m 644 check_hpux_drd_status.conf.dist
|
file -m 644 check_hpux_drd_status.conf.dist
|
||||||
file -m 644 check_hpux_file_age.conf.dist
|
file -m 644 check_hpux_file_age.conf.dist
|
||||||
file -m 644 check_hpux_file_change.conf.dist
|
file -m 644 check_hpux_file_change.conf.dist
|
||||||
@ -141,7 +141,7 @@ This is the OS/platform plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates
|
directory ../../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates
|
||||||
file -m 644 mail_body.tpl-check_hpux_fs_mounts_options
|
file -m 644 mail_body.tpl-check_hpux_fs_mounts_options
|
||||||
file -m 644 mail_body.tpl-check_hpux_ioscan
|
file -m 644 mail_body.tpl-check_hpux_ioscan
|
||||||
file -m 644 mail_body.tpl-check_hpux_ovpa_status
|
file -m 644 mail_body.tpl-check_hpux_ovpa_status
|
||||||
|
@ -58,7 +58,7 @@ This is the core EIF plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 notify_eif.sh
|
file -m 755 notify_eif.sh
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ This is the core EIF plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers
|
directory ../../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers
|
||||||
file -m 644 notify_eif.conf.dist
|
file -m 644 notify_eif.conf.dist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ This is the core SMS plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../opt/hc/lib/core=/opt/hc/lib/core
|
directory ../../../opt/hc/lib/core=/opt/hc/lib/core
|
||||||
file -m 755 notify_sms.sh
|
file -m 755 notify_sms.sh
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ This is the core SMS plugin package"
|
|||||||
|
|
||||||
file_permissions -u 0222 -o root -g sys
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
directory ../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers
|
directory ../../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers
|
||||||
file -m 644 notify_sms.conf.dist
|
file -m 644 notify_sms.conf.dist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -21,9 +21,10 @@
|
|||||||
# BUILD/
|
# BUILD/
|
||||||
# BUILDROOT/
|
# BUILDROOT/
|
||||||
# RPMS/
|
# RPMS/
|
||||||
# SOURCES/
|
# opt/
|
||||||
# SOURCES/bin/<hc_scripts>
|
# opt/hc/bin/<hc_scripts>
|
||||||
# SOURCES/lib/*/<hc_plugins>
|
# opt/hc/lib/*/<hc_plugins>
|
||||||
|
# etc/opt/hc/<hc_configs>
|
||||||
# SPECS/<spec_files>
|
# SPECS/<spec_files>
|
||||||
# SRPMS/
|
# SRPMS/
|
||||||
#
|
#
|
||||||
@ -60,5 +61,3 @@ exit 0
|
|||||||
#******************************************************************************
|
#******************************************************************************
|
||||||
# END of script
|
# END of script
|
||||||
#******************************************************************************
|
#******************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user