Date: Thu, 9 Apr 2009 12:42:27 +0200 From: Lupe Christoph <lupe@lupe-christoph.de> To: Guido Falsi <mad@madpilot.net> Cc: ports@freebsd.org Subject: Re: squidguard and default blacklists in plist Message-ID: <20090409104226.GD9629@lupe-christoph.de> In-Reply-To: <20090409094545.GB43377@megatron.madpilot.net> References: <20090409094545.GB43377@megatron.madpilot.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, 2009-04-09 at 11:45:45 +0200, Guido Falsi wrote: This is how sysutils/munin=node does it: Makefile: post-install: ... ${INSTALL_DATA} ${FILESDIR}/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample @if [ ! -f ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf ]; then \ ${INSTALL_DATA} ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \ fi ... pkg-plist: @unexec if cmp -s %D/etc/munin/plugin-conf.d/plugins.conf %D/etc/munin/plugin-conf.d/plugins.conf.sample; then rm -f %D/etc/munin/plugin-conf.d/plugins.conf; fi etc/munin/plugin-conf.d/plugins.conf.sample I.e. I install the config provided by Munin as plugins.conf.sample. If there is no plugins.conf, I copy plugins.conf.sample to plugins.conf. On deinstall, I check if plugins.conf has been modified by comparing it to the sample. If it hasn't (e.g. package build), I remove it. Then i remove the sample. I believe this is a simple and robust method. HTH, Lupe Christoph -- | There is no substitute for bad design except worse design. | | /me |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090409104226.GD9629>