aboutsummaryrefslogtreecommitdiff
path: root/sysutils/munin-master
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-master
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-master')
-rw-r--r--sysutils/munin-master/Makefile2
-rw-r--r--sysutils/munin-master/pkg-deinstall28
-rw-r--r--sysutils/munin-master/pkg-install10
-rw-r--r--sysutils/munin-master/pkg-plist5
4 files changed, 7 insertions, 38 deletions
diff --git a/sysutils/munin-master/Makefile b/sysutils/munin-master/Makefile
index aebab5313100..ca7d9c2ff99d 100644
--- a/sysutils/munin-master/Makefile
+++ b/sysutils/munin-master/Makefile
@@ -3,6 +3,7 @@
PORTNAME= munin
PORTVERSION= ${MUNIN_VERSION}
+PORTREVISION= 1
CATEGORIES= sysutils perl5
MASTER_SITES= ${MUNIN_SITES}
PKGNAMESUFFIX= -master
@@ -61,6 +62,7 @@ post-install:
)
(cd ${STAGEDIR}${ETCDIR}; for i in `find . -type f`; do mv $$i $$i.sample; done)
${MV} ${STAGEDIR}${WWWDIR}/.htaccess ${STAGEDIR}${WWWDIR}/.htaccess.sample
+ ${INSTALL_DATA} ${FILESDIR}/newsyslog ${STAGEDIR}${ETCDIR}/munin-master.newsyslog
.include <bsd.port.pre.mk>
diff --git a/sysutils/munin-master/pkg-deinstall b/sysutils/munin-master/pkg-deinstall
index d0898da7540e..1411c57f0996 100644
--- a/sysutils/munin-master/pkg-deinstall
+++ b/sysutils/munin-master/pkg-deinstall
@@ -53,39 +53,11 @@ delete_crontab_entries() {
rm $TMPFILE
}
-delnewsyslog() {
- tmp=`mktemp -t munin` || exit 1
- sed -e '/^\/var\/log\/munin\/\*\.log[ ]/d' /etc/newsyslog.conf >${tmp}
- cat ${tmp} > /etc/newsyslog.conf
- rm ${tmp}
-}
-
-newsyslog() {
- ENTRY=`fgrep '/var/log/munin/*' /etc/newsyslog.conf`
- DEFAULT='/var/log/munin/*.log munin:munin 644 7 * @T00 GNWZ'
- if [ -z "$ENTRY" ]
- then
- exit 0
- elif [ "$ENTRY" = "$DEFAULT" ]
- then
- delnewsyslog
- elif yesno "You have changed the default munin-master entry in \"/etc/newsyslog.conf\".
-Do you want me to delete it?" y
- then
- delnewsyslog
- echo "Done."
- fi
-}
-
-
case $2 in
DEINSTALL)
if [ -z "${PACKAGE_BUILDING}" ]
then
delete_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN'
- newsyslog
fi
;;
- POST-DEINSTALL)
- ;;
esac
diff --git a/sysutils/munin-master/pkg-install b/sysutils/munin-master/pkg-install
index c4b36f0b54ce..d28f0d6b9d41 100644
--- a/sysutils/munin-master/pkg-install
+++ b/sysutils/munin-master/pkg-install
@@ -52,15 +52,6 @@ create_crontab_entries() {
fi
}
-newsyslog() {
- if ! fgrep -q '/var/log/munin/*' /etc/newsyslog.conf
- then
- cat >> /etc/newsyslog.conf <<EOT
-/var/log/munin/*.log munin:munin 644 7 * @T00 GNWZ
-EOT
- fi
-}
-
move_www_dir() {
if [ -d ${PKG_PREFIX}/www/data/munin -a ! -d ${PKG_PREFIX}/www/munin ]
then
@@ -79,7 +70,6 @@ case $2 in
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]
then
- newsyslog
create_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN' <<EOT
#BEGIN_MUNIN_MAIN
MAILTO=root
diff --git a/sysutils/munin-master/pkg-plist b/sysutils/munin-master/pkg-plist
index a71b65f9edaa..5ff5f4fdadc5 100644
--- a/sysutils/munin-master/pkg-plist
+++ b/sysutils/munin-master/pkg-plist
@@ -33,6 +33,11 @@ bin/munin-cron
@sample %%ETCDIR%%/templates/partial/logo_path.tmpl.sample
@sample %%ETCDIR%%/templates/partial/navigation.tmpl.sample
@sample %%ETCDIR%%/templates/partial/path.tmpl.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-master.newsyslog etc/newsyslog.conf.d/munin-master
%%SITE_PERL%%/Munin/Master/Config.pm
%%SITE_PERL%%/Munin/Master/GraphOld.pm
%%SITE_PERL%%/Munin/Master/Group.pm