summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-11-02 20:21:48 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-11-04 19:37:22 -0400
commit8f978407a29d863ab28404912b53cdcd37310e06 (patch)
treea9933292cb63a0cf3186bb12192d51b074068030 /net-analyzer/pnp4nagios
parentnet-analyzer/pnp4nagios: use consistent perfdata directories. (diff)
downloadgentoo-8f978407a29d863ab28404912b53cdcd37310e06.tar.gz
gentoo-8f978407a29d863ab28404912b53cdcd37310e06.tar.bz2
gentoo-8f978407a29d863ab28404912b53cdcd37310e06.zip
net-analyzer/pnp4nagios: fix the default stats directory.
The process_perfdata.cfg file refers to a STATS_DIR that is set to "@localstatedir@/stats" at build-time. However, the build system doesn't create that directory nor ensure that it is writable. This latest revision passes --localstatedir to econf, and then creates the associated directory with the desired permissions. The "bulk mode" without NPCD now works out-of-the-box! Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'net-analyzer/pnp4nagios')
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild (renamed from net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild)21
1 files changed, 13 insertions, 8 deletions
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild
index 3e886eb89dc7..9642d1e64792 100644
--- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild
@@ -44,11 +44,10 @@ src_configure() {
econf \
--sysconfdir="${EPREFIX}"/etc/pnp \
--datarootdir="${EPREFIX}"/usr/share/pnp \
+ --localstatedir="${EPREFIX}"/var/lib/pnp \
--with-nagios-user="${user_group}" \
--with-nagios-group="${user_group}" \
- --with-perfdata-dir="${EPREFIX}"/var/lib/pnp/perfdata \
- --with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log \
- --with-perfdata-spool-dir="${EPREFIX}"/var/spool/pnp
+ --with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log
}
src_compile() {
@@ -78,14 +77,20 @@ src_install() {
fowners :apache /etc/pnp/process_perfdata.cfg
fi
- # The nagios or icinga user will also need to be able to write
- # performance data to the perfdata-dir and perfdata-spool-dir
- # directories.
+ # The nagios or icinga user needs to write performance data to the
+ # perfdata-dir...
local user_group=nagios
( use icinga || use icinga2 ) && user_group=icinga
- dodir /var/lib/pnp/{,perfdata} /var/log/pnp
- fowners "${user_group}:${user_group}" /var/lib/pnp/{,perfdata}
+ fowners "${user_group}:${user_group}" /var/lib/pnp/{,perfdata,spool}
+
+ # and likewise for its logs...
+ dodir /var/log/pnp
fowners "${user_group}:${user_group}" /var/log/pnp
+
+ # and its statistics. This one is arguably the responsibility of the
+ # build system, since process_perfdata.cfg refers to this location.
+ dodir /var/lib/pnp/stats
+ fowners "${user_group}:${user_group}" /var/lib/pnp/stats
}
pkg_postinst() {