- Update to 2.4.7

- Introduce new rc.conf variable "icinga2_mkvar" defaulting to "NO". The
  variable controls the creation and chown'ing of missing files and
  directories in /var. [1]
- Add an UPDATING entry for this

PR:		206022 [1]
Submitted by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>
Sponsored by:	Essen Linuxhotel Hackathon 2016
This commit is contained in:
Lars Engels 2016-04-24 16:58:58 +00:00
parent 130a86c555
commit a8c6c74a30
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=413950
4 changed files with 37 additions and 22 deletions

View File

@ -5,6 +5,16 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20160414:
AFFECTS: Users of net-mgmt/icinga2
AUTHOR: lme@FreeBSD.org
The creation of Icinga2 directories and files in /var is now controlled
by the /etc/rc.conf variable icinga2_mkvar. Earlier ports always
created the /var entries, but could slow startup significantly when /var
was a normal disk rather than a RAM disk. icinga2_mkvar defaults to
"NO".
20160415:
AFFECTS: users of audio/chromaprint
AUTHOR: jhale@FreeBSD.org
@ -31,7 +41,6 @@ you update your ports collection, before attempting any port upgrades.
ttrssd_local_db="NO"
in your /etc/rc.conf .
20160414:
AFFECTS: Users of graphics/kipi-plugin-googledrive and graphics/kipi-plugin-picasaweb
AUTHOR: kde@FreeBSD.org

View File

@ -2,7 +2,7 @@
PORTNAME= icinga2
DISTVERSIONPREFIX= v
DISTVERSION= 2.4.4
DISTVERSION= 2.4.7
CATEGORIES= net-mgmt
MAINTAINER= lme@FreeBSD.org

View File

@ -1,2 +1,2 @@
SHA256 (icinga-icinga2-v2.4.4_GH0.tar.gz) = ce19ed52c447929f5f9dae11b75d080b76b7aa680ee930c59db4202a2218d6b5
SIZE (icinga-icinga2-v2.4.4_GH0.tar.gz) = 1361983
SHA256 (icinga-icinga2-v2.4.7_GH0.tar.gz) = db00c3bf1be5b18a477953f39df467039521d4f00826951d5c6de43cef96acd9
SIZE (icinga-icinga2-v2.4.7_GH0.tar.gz) = 1763118

View File

@ -12,6 +12,9 @@
# Set it to "YES" to enable icinga2.
# icinga2_flags (str): Set to "" by default.
# icinga2_configfile (str): Set to "%%PREFIX%%/etc/icinga2/icinga2.cfg" by default.
# icinga2_mkvar (bool): Set to "NO" by default.
# Set it to "YES" to have the rc script create all
# directories in /var (needed when /var is on a ramdisk)
#
. /etc/rc.subr
@ -27,6 +30,7 @@ load_rc_config "${name}"
: ${icinga2_enable:="NO"}
: ${icinga2_configfile="%%PREFIX%%/etc/${name}/${name}.conf"}
: ${icinga2_mkvar:="NO"}
command="%%PREFIX%%/sbin/${name}"
procname="/usr/local/lib/icinga2/sbin/icinga2"
@ -79,26 +83,28 @@ reload_precmd() {
}
start_precmd() {
# Create necessary directories / change ownership
#
# While this is also done through pkg-plist, /var might be on a ramdisk,
# so make sure all needed files and directories are created before starting
# Icinga.
for d in "${icinga2_logdir}" "${icinga2_logdir}/compat" \
"${icinga2_logdir}/compat/archives" "${icinga2_libdir}" \
"${icinga2_spooldir}" "${icinga2_spooldir}/tmp" \
"${icinga2_rundir}" "${icinga2_cachedir}"; do
if [ ! -d "${d}" ]; then
install -d -o ${icinga2_user} -g ${icinga2_group} "${d}"
else
chown ${icinga2_user}:${icinga2_group} "${d}"
fi
done
if checkyesno "icinga2_mkvar"; then
# Create necessary directories / change ownership
#
# While this is also done through pkg-plist, /var might be on a ramdisk,
# so make sure all needed files and directories are created before starting
# Icinga.
for d in "${icinga2_logdir}" "${icinga2_logdir}/compat" \
"${icinga2_logdir}/compat/archives" "${icinga2_libdir}" \
"${icinga2_spooldir}" "${icinga2_spooldir}/tmp" \
"${icinga2_rundir}" "${icinga2_cachedir}"; do
if [ ! -d "${d}" ]; then
install -d -o ${icinga2_user} -g ${icinga2_group} "${d}"
else
chown ${icinga2_user}:${icinga2_group} "${d}"
fi
done
install -d -o ${icinga2_user} -g %%WWWGRP%% "${icinga2_rundir}/cmd"
install -d -o ${icinga2_user} -g %%WWWGRP%% "${icinga2_rundir}/cmd"
chown -R ${icinga2_user}:${icinga2_user} "${icinga2_libdir}"
chown -R ${icinga2_user}:${icinga2_user} "${icinga2_spooldir}"
chown -R ${icinga2_user}:${icinga2_user} "${icinga2_libdir}"
chown -R ${icinga2_user}:${icinga2_user} "${icinga2_spooldir}"
fi
if ! icinga2_checkconfig; then
return 1