summaryrefslogtreecommitdiff
path: root/sysutils/munin-master/pkg-install
diff options
context:
space:
mode:
authorBen Woods <woodsb02@FreeBSD.org>2018-11-24 02:50:06 +0000
committerBen Woods <woodsb02@FreeBSD.org>2018-11-24 02:50:06 +0000
commitb044e71547c749b4cb14daf3b97f70bdef0bc6d6 (patch)
tree0796193a9a2d7993c4a60176df248a8e6f6cd537 /sysutils/munin-master/pkg-install
parentgraphics/radiance: Update g20181029 -> 0.6.0 (diff)
sysutils/munin-*: Use .conf suffix for /usr/local/etc/newsyslog.conf.d/
- Rename the files installed to /usr/local/etc/newsyslog.conf.d/ to end with a '.conf' suffix. - Add pkg-install script to automatically move any copies of the old newsyslog file to the new location if it was modified from the default or delete the old file if it is has not been modified. - Add a note to UPDATING and pkg-message to warn users of this, in case they are using provisioning/configuration management tools which need to be modified. Recent changes to /etc/newsyslog.conf (r340318) will only include files from the /usr/local/etc/newsyslog.conf.d/ directory which end with '.conf' and do not beginning with a '.' character. Reviewed by: mandree (D17088) Approved by: mat (maintainer) Differential Revision: https://reviews.freebsd.org/D17089
Diffstat (limited to 'sysutils/munin-master/pkg-install')
-rw-r--r--sysutils/munin-master/pkg-install18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysutils/munin-master/pkg-install b/sysutils/munin-master/pkg-install
index d28f0d6b9d41..9a120494261c 100644
--- a/sysutils/munin-master/pkg-install
+++ b/sysutils/munin-master/pkg-install
@@ -60,6 +60,23 @@ move_www_dir() {
fi
}
+move_newsyslog_conf() {
+ oldfile=${PKG_PREFIX}/etc/newsyslog.conf.d/munin-master
+ newfile=${PKG_PREFIX}/etc/newsyslog.conf.d/munin-master.conf
+ samplefile=${PKG_PREFIX}/etc/munin/munin-master.newsyslog
+ if [ -f ${oldfile} ]; then
+ echo "Configuration file found in old location: ${oldfile}"
+ if cmp -s ${samplefile} ${newfile} > /dev/null; then
+ echo "Configuration file in new location has not been modified from the default: ${newfile}"
+ echo " => Moving old configuration file to new location"
+ mv -f ${oldfile} ${newfile}
+ else
+ echo "Configuration file in new location has been modified from the default: ${newfile}"
+ echo " => Deleting old configuration file"
+ rm ${oldfile}
+ fi
+ fi
+}
########################################################################
@@ -78,5 +95,6 @@ MAILTO=root
#END_MUNIN_MAIN
EOT
fi
+ move_newsyslog_conf
;;
esac