aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2012-02-10 02:08:28 +0800
committercrees <crees@FreeBSD.org>2012-02-10 02:08:28 +0800
commitc2774713034f5b4409361004cf490f5426ef8972 (patch)
treea07655fd5af5263209082535ee4f35e6493632b0 /sysutils
parent01ff8efa347077f7944cb2247744aa87fb78fad6 (diff)
downloadfreebsd-ports-gnome-c2774713034f5b4409361004cf490f5426ef8972.tar.gz
freebsd-ports-gnome-c2774713034f5b4409361004cf490f5426ef8972.tar.zst
freebsd-ports-gnome-c2774713034f5b4409361004cf490f5426ef8972.zip
Copy over configuration file on install if not present
PR: ports/164745 Submitted by: crees (me) Approved by: Dirk Engling (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ezjail/Makefile6
-rw-r--r--sysutils/ezjail/pkg-plist2
2 files changed, 8 insertions, 0 deletions
diff --git a/sysutils/ezjail/Makefile b/sysutils/ezjail/Makefile
index 0e777d7cb86a..affee4fc7d21 100644
--- a/sysutils/ezjail/Makefile
+++ b/sysutils/ezjail/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ezjail
PORTVERSION= 3.2.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://erdgeist.org/arts/software/ezjail/
@@ -19,4 +20,9 @@ MAN5= ezjail.conf.5
MAN7= ezjail.7
MAN8= ezjail-admin.8
+post-install:
+ [ -f ${PREFIX}/etc/${PORTNAME}.conf ] || \
+ ${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.sample \
+ ${PREFIX}/etc/${PORTNAME}.conf
+
.include <bsd.port.mk>
diff --git a/sysutils/ezjail/pkg-plist b/sysutils/ezjail/pkg-plist
index b979db9464f0..156c8cc4c1fc 100644
--- a/sysutils/ezjail/pkg-plist
+++ b/sysutils/ezjail/pkg-plist
@@ -1,4 +1,6 @@
+@unexec cmp -s %D/etc/ezjail.conf.sample %D/etc/ezjail.conf && rm -f %D/etc/ezjail.conf || true
etc/ezjail.conf.sample
+@exec [ -f %B/ezjail.conf ] || cp -p %D/%F %B/ezjail.conf
etc/rc.d/ezjail
bin/ezjail-admin
share/zsh/site-functions/ezjail-admin