summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2019-08-31 16:23:00 -0400
committerMichael Orlitzky <mjo@gentoo.org>2019-08-31 17:34:55 -0400
commit7e81910df1947a9b7968fffe52655438b1adbdc4 (patch)
tree3f4d26d663acca7cc84da318f3bf02b984c015e7 /net-analyzer/nagios-core
parentnet-analyzer/nagios-core: use default homedir/shell for "nagios" user. (diff)
downloadgentoo-7e81910df1947a9b7968fffe52655438b1adbdc4.tar.gz
gentoo-7e81910df1947a9b7968fffe52655438b1adbdc4.tar.bz2
gentoo-7e81910df1947a9b7968fffe52655438b1adbdc4.zip
net-analyzer/nagios-core: move localstatedir to /var/lib/nagios.
For whatever reason, the local state directory for nagios was historically set to /var/nagios. The FHS (v3) states that local application state should live under /var/lib instead, so this revision sets it to /var/lib/nagios. This could potentially be annoying to upgraders but is probably non- fatal. The state directory holds logs and service status information that can be regenerated if necessary. Doing so could lead to "extra" service notifications, though. To mitigate this, a warning is emitted telling upgraders how to migrate the state information if they choose to do so. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'net-analyzer/nagios-core')
-rw-r--r--net-analyzer/nagios-core/nagios-core-4.4.5-r2.ebuild (renamed from net-analyzer/nagios-core/nagios-core-4.4.5-r1.ebuild)15
1 files changed, 14 insertions, 1 deletions
diff --git a/net-analyzer/nagios-core/nagios-core-4.4.5-r1.ebuild b/net-analyzer/nagios-core/nagios-core-4.4.5-r2.ebuild
index fdfccca6aabe..2fab4595e656 100644
--- a/net-analyzer/nagios-core/nagios-core-4.4.5-r1.ebuild
+++ b/net-analyzer/nagios-core/nagios-core-4.4.5-r2.ebuild
@@ -96,7 +96,7 @@ src_configure() {
econf ${myconf} \
--prefix=/usr \
--bindir=/usr/sbin \
- --localstatedir=/var/nagios \
+ --localstatedir=/var/lib/nagios \
--sysconfdir=/etc/nagios \
--libexecdir=/usr/$(get_libdir)/nagios/plugins \
--with-cgibindir=/usr/$(get_libdir)/nagios/cgi-bin \
@@ -210,4 +210,17 @@ pkg_postinst() {
elog "filesystem. You can fix this by adding nagios into"
elog "the group wheel, but this is not recomended."
elog
+
+ if [ -n "${REPLACING_VERSIONS}" ]; then
+ ewarn "The local state directory for nagios has changed in v4.4.5,"
+ ewarn "from ${EROOT}var/nagios to ${EROOT}var/lib/nagios. If you"
+ ewarn "wish to migrate your state to the new location, first stop"
+ ewarn "nagios and then run"
+ ewarn ""
+ ewarn " diff --recursive --brief ${EROOT}var/nagios ${EROOT}var/lib/nagios"
+ ewarn ""
+ ewarn "to identify any files that should be moved to the new"
+ ewarn "location. They can simply be moved with \"mv\" before"
+ ewarn "restarting nagios."
+ fi
}