summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-08-24 22:13:22 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-08-24 22:13:22 +0000
commitbdd4910d67bde5aa5f4ac9056a923538c2bf6109 (patch)
treecda743c8d64082acdcb243cd8f9760b5ccbe7c6f /net-analyzer
parentFix build with gcc-4.7, thanks dev-zero (diff)
downloadgentoo-2-bdd4910d67bde5aa5f4ac9056a923538c2bf6109.tar.gz
gentoo-2-bdd4910d67bde5aa5f4ac9056a923538c2bf6109.tar.bz2
gentoo-2-bdd4910d67bde5aa5f4ac9056a923538c2bf6109.zip
Restore checkpath for the pidfile, but don't set owner on it (it doesn't need to have one, here); always change owners in the localstart script instead. Change the default pid_file for the node to /var/run/munin-node.pid as the node does not use anything else in that directory.
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/munin/ChangeLog9
-rw-r--r--net-analyzer/munin/files/localstart-munin2
-rw-r--r--net-analyzer/munin/files/munin-node_init.d_2.0.56
-rw-r--r--net-analyzer/munin/munin-2.0.5-r2.ebuild8
4 files changed, 20 insertions, 5 deletions
diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog
index 8ff2bfec4130..67d0f6c53bdb 100644
--- a/net-analyzer/munin/ChangeLog
+++ b/net-analyzer/munin/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/munin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.96 2012/08/23 19:20:42 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.97 2012/08/24 22:13:22 flameeyes Exp $
+
+ 24 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> files/localstart-munin,
+ files/munin-node_init.d_2.0.5, munin-2.0.5-r2.ebuild:
+ Restore checkpath for the pidfile, but don't set owner on it (it doesn't need
+ to have one, here); always change owners in the localstart script instead.
+ Change the default pid_file for the node to /var/run/munin-node.pid as the
+ node does not use anything else in that directory.
*munin-2.0.5-r2 (23 Aug 2012)
diff --git a/net-analyzer/munin/files/localstart-munin b/net-analyzer/munin/files/localstart-munin
index b32d76092038..2934cba72c18 100644
--- a/net-analyzer/munin/files/localstart-munin
+++ b/net-analyzer/munin/files/localstart-munin
@@ -1,7 +1,5 @@
#!/bin/sh
-[ -d /var/run/munin ] && exit 0
-
mkdir -p /var/run/munin
chown munin:munin /var/run/munin
chmod 0700 /var/run/munin
diff --git a/net-analyzer/munin/files/munin-node_init.d_2.0.5 b/net-analyzer/munin/files/munin-node_init.d_2.0.5
index a3ad32f0dd3a..657ae6640a3a 100644
--- a/net-analyzer/munin/files/munin-node_init.d_2.0.5
+++ b/net-analyzer/munin/files/munin-node_init.d_2.0.5
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/files/munin-node_init.d_2.0.5,v 1.1 2012/08/23 19:20:42 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/files/munin-node_init.d_2.0.5,v 1.2 2012/08/24 22:13:22 flameeyes Exp $
get_munin_config() {
awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
@@ -24,4 +24,8 @@ depend() {
use logger
}
+start_pre() {
+ checkpath -d $(dirname ${pidfile})
+}
+
# vim: filetype=gentoo-init-d:
diff --git a/net-analyzer/munin/munin-2.0.5-r2.ebuild b/net-analyzer/munin/munin-2.0.5-r2.ebuild
index a85dc8a50d64..537f3b13a18b 100644
--- a/net-analyzer/munin/munin-2.0.5-r2.ebuild
+++ b/net-analyzer/munin/munin-2.0.5-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.5-r2.ebuild,v 1.1 2012/08/23 19:20:42 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.5-r2.ebuild,v 1.2 2012/08/24 22:13:22 flameeyes Exp $
EAPI=4
@@ -168,6 +168,12 @@ src_install() {
"${D}"/etc/munin/munin-node.conf || die
fi
+ # Use a simpler pid file to avoid trouble with /run in tmpfs. The
+ # munin-node service is ran as user root, and only later drops
+ # privileges.
+ sed -i -e 's:/var/run/munin/munin-node.pid:/var/run/munin-node.pid:' \
+ "${D}"/etc/munin/munin-node.conf || die
+
keepdir /var/lib/munin-async/.ssh /var/spool/munin-async
touch "${D}"/var/lib/munin-async/.ssh/authorized_keys
fowners munin-async /var/lib/munin-async/.ssh/{,authorized_keys}