aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorglarkin <glarkin@FreeBSD.org>2013-07-19 04:55:32 +0800
committerglarkin <glarkin@FreeBSD.org>2013-07-19 04:55:32 +0800
commit51726e9a82d720a86471c40a544845f24d8878f6 (patch)
tree87eb451d5f25025e443bc15e009ef7a8c73e5a0d /security
parentc187da55f37a05483cfaf61935da7924193c2549 (diff)
downloadfreebsd-ports-gnome-51726e9a82d720a86471c40a544845f24d8878f6.tar.gz
freebsd-ports-gnome-51726e9a82d720a86471c40a544845f24d8878f6.tar.zst
freebsd-ports-gnome-51726e9a82d720a86471c40a544845f24d8878f6.zip
- Added an option to control installation of the crontab file. The
option defaults to yes during interactive installation, and the crontab file is not installed during non-interactive installation. Requested by: espen@tagestad.no (via email)
Diffstat (limited to 'security')
-rw-r--r--security/logcheck/Makefile15
-rw-r--r--security/logcheck/files/pkg-install.in8
2 files changed, 17 insertions, 6 deletions
diff --git a/security/logcheck/Makefile b/security/logcheck/Makefile
index 592430c73cd6..f22a36ad0e0f 100644
--- a/security/logcheck/Makefile
+++ b/security/logcheck/Makefile
@@ -1,12 +1,9 @@
-# Ports collection makefile for: logcheck
-# Date created: 9 December 1999
-# Whom: Dan Langille <dan@freebsddiary.org>
-#
+# Created by: Dan Langille <dan@freebsddiary.org>
# $FreeBSD$
-#
PORTNAME= logcheck
PORTVERSION= 1.3.15
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -29,6 +26,12 @@ BASEDIR?= # None. portlint compliance
DBDIR= ${BASEDIR}/var/db/${PORTNAME}
RUNDIR= ${BASEDIR}/var/run/${PORTNAME}
+OPTIONS_DEFINE= CRON
+CRON_DESC= Install cron script automatically
+.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
+OPTIONS_DEFAULT=CRON
+.endif
+
# Enable Perl dependency for logtail script
USE_PERL5= yes
@@ -39,7 +42,7 @@ SUB_LIST+= LOGCHECK_USER=${LOGCHECK_USER} \
LOGCHECK_UID=${LOGCHECK_UID} \
LOGCHECK_GROUP=${LOGCHECK_GROUP} \
LOGCHECK_GID=${LOGCHECK_GID} \
- PW=${PW}
+ PW=${PW} CRON=${PORT_OPTIONS:MCRON}
SUB_FILES= pkg-install pkg-deinstall pkg-message
PLIST_SUB+= DBDIR=${DBDIR} RUNDIR=${RUNDIR}
CONFIG_DIRS= cracking.d ignore.d.paranoid ignore.d.server \
diff --git a/security/logcheck/files/pkg-install.in b/security/logcheck/files/pkg-install.in
index cb17b01e334b..4f4f6ef3e314 100644
--- a/security/logcheck/files/pkg-install.in
+++ b/security/logcheck/files/pkg-install.in
@@ -25,6 +25,7 @@ PRE-INSTALL)
fi
;;
POST-INSTALL)
+ if [ "%%CRON%%" = "CRON" ]; then
if [ -f %%EXAMPLESDIR%%/crontab.in ] ; then
if /usr/bin/crontab -u "${user}" -l >/tmp/logchecktab$$ 2>&1 ; then
if test -s /tmp/logchecktab$$; then
@@ -48,6 +49,13 @@ POST-INSTALL)
fi
rm -f /tmp/logchecktab$$
fi
+ else
+ echo "---> Crontab file was not installed for user \"${user}\""
+ if [ -f %%EXAMPLESDIR%%/crontab.in ]; then
+ echo "---> A sample crontab file can be found in %%EXAMPLESDIR%%/crontab.in"
+ echo "---> for manual installation."
+ fi
+ fi
for f in ${configfiles}; do
if [ ! -e %%PREFIX%%/etc/logcheck/${f} ]; then