squidguard and default blacklists in plist
Lupe Christoph
lupe at lupe-christoph.de
Thu Apr 9 10:54:13 UTC 2009
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 |
More information about the freebsd-ports
mailing list