aboutsummaryrefslogtreecommitdiff
path: root/sysutils/munin-node
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2016-12-26 17:30:00 +0000
committerMathieu Arnold <mat@FreeBSD.org>2016-12-26 17:30:00 +0000
commit07e393b388cf892fc4d8796ab46ad7e682fdc3ff (patch)
treeae6014d0bdca6a4de4e5d183824bbdb68bcad345 /sysutils/munin-node
parente7ec65055d7ea41996b9d9a19c202a9ff175b3e0 (diff)
downloadports-07e393b388cf892fc4d8796ab46ad7e682fdc3ff.tar.gz
ports-07e393b388cf892fc4d8796ab46ad7e682fdc3ff.zip
Drop newsyslog's configuration into etc/newsyslog.conf.d.
Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=429557
Diffstat (limited to 'sysutils/munin-node')
-rw-r--r--sysutils/munin-node/Makefile2
-rw-r--r--sysutils/munin-node/files/newsyslog1
-rw-r--r--sysutils/munin-node/pkg-deinstall32
-rw-r--r--sysutils/munin-node/pkg-install13
-rw-r--r--sysutils/munin-node/pkg-plist5
5 files changed, 8 insertions, 45 deletions
diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile
index 2cbb33690669..06910459b017 100644
--- a/sysutils/munin-node/Makefile
+++ b/sysutils/munin-node/Makefile
@@ -3,6 +3,7 @@
PORTNAME= munin
PORTVERSION= ${MUNIN_VERSION}
+PORTREVISION= 1
CATEGORIES= sysutils perl5
MASTER_SITES= ${MUNIN_SITES}
PKGNAMESUFFIX= -node
@@ -84,5 +85,6 @@ post-install:
${INSTALL_MAN} munin-node.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5; \
${INSTALL_MAN} munin.8 ${STAGEDIR}${MAN8PREFIX}/man/man8; \
)
+ ${INSTALL_DATA} ${FILESDIR}/newsyslog ${STAGEDIR}${ETCDIR}/munin-node.newsyslog
.include <bsd.port.mk>
diff --git a/sysutils/munin-node/files/newsyslog b/sysutils/munin-node/files/newsyslog
new file mode 100644
index 000000000000..28d2ad28f735
--- /dev/null
+++ b/sysutils/munin-node/files/newsyslog
@@ -0,0 +1 @@
+/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
diff --git a/sysutils/munin-node/pkg-deinstall b/sysutils/munin-node/pkg-deinstall
deleted file mode 100644
index 8b7b8d9f6e7d..000000000000
--- a/sysutils/munin-node/pkg-deinstall
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-
-delnewsyslog() {
- tmp="/etc/#munin-node$$"
- sed -e '/^\/var\/log\/munin\/munin-node.log[ ]/d' /etc/newsyslog.conf >${tmp}
- cat ${tmp} > /etc/newsyslog.conf
- rm ${tmp}
-}
-
-newsyslog() {
- ENTRY=`grep /var/log/munin/munin-node.log /etc/newsyslog.conf`
- DEFAULT='/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid'
- if [ -z "$ENTRY" ]; then
- exit 0
- elif [ "$ENTRY" = "$DEFAULT" ]; then
- delnewsyslog
- else
- echo "You have changed the default munin-node entry in \"/etc/newsyslog.conf\"".
- echo "If you deinstall munin-node permanently, you have to manually remove it"
- fi
-}
-
-
-case $2 in
- DEINSTALL)
- if [ -z "${PACKAGE_BUILDING}" ]; then
- newsyslog
- fi
- ;;
- POST-DEINSTALL)
- ;;
-esac
diff --git a/sysutils/munin-node/pkg-install b/sysutils/munin-node/pkg-install
index a9d45dad0841..dd48b19a7058 100644
--- a/sysutils/munin-node/pkg-install
+++ b/sysutils/munin-node/pkg-install
@@ -12,26 +12,13 @@ init_plugins() {
echo "done."
}
-newsyslog() {
- if grep -q /var/log/munin/munin-node.log /etc/newsyslog.conf; then
- :
- else
- cat >> /etc/newsyslog.conf <<EOT
-/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
-EOT
- fi
-}
-
########################################################################
case $2 in
- PRE-INSTALL)
- ;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
init_plugins
- newsyslog
fi
;;
esac
diff --git a/sysutils/munin-node/pkg-plist b/sysutils/munin-node/pkg-plist
index 75e574e91128..dadbbffe441c 100644
--- a/sysutils/munin-node/pkg-plist
+++ b/sysutils/munin-node/pkg-plist
@@ -1,6 +1,11 @@
bin/munindoc
@sample %%ETCDIR%%/munin-node.conf.sample
@sample %%ETCDIR%%/plugin-conf.d/plugins.conf.sample
+@comment the directory exists in STAGEDIR because it is present in
+@comment BSD.local.dist but if not registered here, it will not exist in PREFIX
+@comment when the package is installed.
+@dir etc/newsyslog.conf.d
+@sample %%ETCDIR%%/munin-node.newsyslog etc/newsyslog.conf.d/munin-node
%%SITE_PERL%%/Munin/Node/Config.pm
%%SITE_PERL%%/Munin/Node/Configure/Debug.pm
%%SITE_PERL%%/Munin/Node/Configure/History.pm