aboutsummaryrefslogtreecommitdiff
path: root/security/rkhunter
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2017-05-20 02:59:01 +0000
committerAlan Somers <asomers@FreeBSD.org>2017-05-20 02:59:01 +0000
commitd308cd0fccedb01fc2023f986b17eda08a21c006 (patch)
treeefb548525dbd08753926ff2f03fdec4e69bdaed4 /security/rkhunter
parentcd26188ac18f6c347cc0ba8051ae73fafc597d45 (diff)
downloadports-d308cd0fccedb01fc2023f986b17eda08a21c006.tar.gz
ports-d308cd0fccedb01fc2023f986b17eda08a21c006.zip
Notes
Diffstat (limited to 'security/rkhunter')
-rw-r--r--security/rkhunter/Makefile2
-rw-r--r--security/rkhunter/files/415.rkhunter.in17
2 files changed, 18 insertions, 1 deletions
diff --git a/security/rkhunter/Makefile b/security/rkhunter/Makefile
index ff9b1a6f6f97..e8503b87fab1 100644
--- a/security/rkhunter/Makefile
+++ b/security/rkhunter/Makefile
@@ -3,7 +3,7 @@
PORTNAME= rkhunter
PORTVERSION= 1.4.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= SF
diff --git a/security/rkhunter/files/415.rkhunter.in b/security/rkhunter/files/415.rkhunter.in
index c67dd0d734b7..966e182f6703 100644
--- a/security/rkhunter/files/415.rkhunter.in
+++ b/security/rkhunter/files/415.rkhunter.in
@@ -16,6 +16,13 @@ if [ -r /etc/defaults/periodic.conf ]; then
source_periodic_confs
fi
+SLEEP=/bin/sleep
+JOT=/usr/bin/jot
+
+random() {
+ ${JOT} -r 1 0 900
+}
+
: ${daily_rkhunter_update_flags="--update --nocolors"}
: ${daily_rkhunter_check_flags="--checkall --nocolors --skip-keypress"}
@@ -24,6 +31,16 @@ case "$daily_rkhunter_update_enable" in
echo ""
echo "Updating the rkhunter database..."
+ # When non-interactive, sleep to reduce congestion on rkhunter site
+ if [ "$1" != -nodelay ]; then
+ # In FreeBSD 12.0 the anticongestion function should be used
+ # instead of a hard-coded sleep
+ if [ -n "$anticongestion_sleeptime" ]; then
+ anticongestion
+ else
+ ${SLEEP} $(random)
+ fi
+ fi
%%PREFIX%%/bin/rkhunter ${daily_rkhunter_update_flags}
;;
esac