Index: rkhunter/Makefile =================================================================== --- rkhunter/Makefile (revision 438321) +++ rkhunter/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= rkhunter PORTVERSION= 1.4.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= SF Index: rkhunter/files/415.rkhunter.in =================================================================== --- rkhunter/files/415.rkhunter.in (revision 438321) +++ rkhunter/files/415.rkhunter.in (working copy) @@ -16,6 +16,13 @@ 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 @@ 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