aboutsummaryrefslogtreecommitdiff
path: root/news/inn/pkg-install
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2003-09-26 06:32:40 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2003-09-26 06:32:40 +0000
commit5471197f6a21a7f7a9a56fb0cae4f787c13b09c4 (patch)
treedfc86d4f25897bc33a5bf202b6cf0cd40eff0ef6 /news/inn/pkg-install
parente0b5438f887504b82c773157ff22b373c6ff0108 (diff)
downloadports-5471197f6a21a7f7a9a56fb0cae4f787c13b09c4.tar.gz
ports-5471197f6a21a7f7a9a56fb0cae4f787c13b09c4.zip
Notes
Diffstat (limited to 'news/inn/pkg-install')
-rw-r--r--news/inn/pkg-install18
1 files changed, 18 insertions, 0 deletions
diff --git a/news/inn/pkg-install b/news/inn/pkg-install
index 78f7bdb4cc1f..fa27dc71c03b 100644
--- a/news/inn/pkg-install
+++ b/news/inn/pkg-install
@@ -2,10 +2,28 @@
PKGNAME=$1
[ ! -n PKG_PREFIX ] && exit 1
+PKG_PREFIX=${PKG_PREFIX:-/usr/local}
case $2 in
PRE-INSTALL)
;;
+ CHECK-CONF)
+ NEWSBASE=${PKG_PREFIX}/news
+ echo "Checking for configuration files"
+ for f in $(find ${NEWSBASE}/etc/ -name "*.dist" -type f)
+ do
+ REALFILE=${f%%.dist}
+ echo -n "Checking if ${REALFILE} exists: "
+ if [ -e ${REALFILE} ]
+ then
+ echo "[YES]"
+ else
+ echo "[NO]"
+ echo " Installing ${f} to ${REALFILE}"
+ cp ${f} ${REALFILE}
+ fi
+ done
+ ;;
POST-INSTALL)
NEWSBASE=${PKG_PREFIX}/news
install -d -o news -g news -m 755 \