summaryrefslogtreecommitdiffstats
path: root/sysutils/logtool
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2001-06-17 17:34:34 +0000
committerijliao <ijliao@FreeBSD.org>2001-06-17 17:34:34 +0000
commit231f18b946d446343915a5946f1b20ba0926a5af (patch)
tree808b1953d4d4cea5b5b26ae484c5d2143d0e3484 /sysutils/logtool
parentafc6dd4be9e59e356f9237ad10f75380a1f927d9 (diff)
downloadFreeBSD-ports-231f18b946d446343915a5946f1b20ba0926a5af.zip
FreeBSD-ports-231f18b946d446343915a5946f1b20ba0926a5af.tar.gz
better etc file management
Submitted by: olgeni
Diffstat (limited to 'sysutils/logtool')
-rw-r--r--sysutils/logtool/Makefile5
-rw-r--r--sysutils/logtool/pkg-plist22
2 files changed, 21 insertions, 6 deletions
diff --git a/sysutils/logtool/Makefile b/sysutils/logtool/Makefile
index 9203c20..483b640 100644
--- a/sysutils/logtool/Makefile
+++ b/sysutils/logtool/Makefile
@@ -27,6 +27,11 @@ post-patch:
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/logtool.1 ${PREFIX}/man/man1
+ @${CP} ${WRKSRC}/conf/logtool.conf ${PREFIX}/etc/logtool/logtool.conf.dist
+ @${CP} ${WRKSRC}/conf/exclude ${PREFIX}/etc/logtool/exclude.dist
+ @${CP} ${WRKSRC}/conf/green ${PREFIX}/etc/logtool/green.dist
+ @${CP} ${WRKSRC}/conf/include ${PREFIX}/etc/logtool/include.dist
+ @${CP} ${WRKSRC}/conf/yellow ${PREFIX}/etc/logtool/yellow.dist
.if !defined(NOPORTDOCS)
@${ECHO_MSG} "===> Installing logtool docs in ${PREFIX}/share/doc/logtool"
@${MKDIR} ${PREFIX}/share/doc/logtool && ${CHMOD} a+rx ${PREFIX}/share/doc/logtool
diff --git a/sysutils/logtool/pkg-plist b/sysutils/logtool/pkg-plist
index 3d13413..cbeb840 100644
--- a/sysutils/logtool/pkg-plist
+++ b/sysutils/logtool/pkg-plist
@@ -1,11 +1,21 @@
bin/logtool
bin/logtail
-etc/logtool/exclude
-etc/logtool/green
-etc/logtool/include
-etc/logtool/logtool.conf
-etc/logtool/yellow
-@dirrm etc/logtool
+@unexec if cmp -s %D/etc/logtool/exclude %D/etc/logtool/exclude.dist; then rm -f %D/etc/logtool/exclude; fi
+etc/logtool/exclude.dist
+@exec [ -f %B/exclude ] || cp %B/%f %B/exclude
+@unexec if cmp -s %D/etc/logtool/green %D/etc/logtool/green.dist; then rm -f %D/etc/logtool/green; fi
+etc/logtool/green.dist
+@exec [ -f %B/green ] || cp %B/%f %B/green
+@unexec if cmp -s %D/etc/logtool/include %D/etc/logtool/include.dist; then rm -f %D/etc/logtool/include; fi
+etc/logtool/include.dist
+@exec [ -f %B/include ] || cp %B/%f %B/include
+@unexec if cmp -s %D/etc/logtool/logtool.conf %D/etc/logtool/logtool.conf.dist; then rm -f %D/etc/logtool/logtool.conf; fi
+etc/logtool/logtool.conf.dist
+@exec [ -f %B/logtool.conf ] || cp %B/%f %B/logtool.conf
+@unexec if cmp -s %D/etc/logtool/yellow %D/etc/logtool/yellow.dist; then rm -f %D/etc/logtool/yellow; fi
+etc/logtool/yellow.dist
+@exec [ -f %B/yellow ] || cp %B/%f %B/yellow
+@unexec rmdir %D/etc/logtool 2>/dev/null || true
%%PORTDOCS%%share/doc/logtool/examples/README
%%PORTDOCS%%share/doc/logtool/examples/cronjob.genwebpage.sh
%%PORTDOCS%%share/doc/logtool/examples/cronjob.emailreport.sh
OpenPOWER on IntegriCloud