From c2774713034f5b4409361004cf490f5426ef8972 Mon Sep 17 00:00:00 2001 From: crees Date: Thu, 9 Feb 2012 18:08:28 +0000 Subject: Copy over configuration file on install if not present PR: ports/164745 Submitted by: crees (me) Approved by: Dirk Engling (maintainer) --- sysutils/ezjail/Makefile | 6 ++++++ sysutils/ezjail/pkg-plist | 2 ++ 2 files changed, 8 insertions(+) (limited to 'sysutils') 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 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 -- cgit