svn commit: r437913 - in head/mail/sa-utils: . files
Matthew Seaman
matthew at FreeBSD.org
Fri Apr 7 07:11:42 UTC 2017
Author: matthew
Date: Fri Apr 7 07:11:40 2017
New Revision: 437913
URL: https://svnweb.freebsd.org/changeset/ports/437913
Log:
New version: 0.03
Add a random delay using the standard 'anticongestion' function (where
available) before attempting to download updates. This to avoid the
'thundering herd' of many simultaneous downloads.
PR: 218444
Reported by: asomers
Modified:
head/mail/sa-utils/Makefile
head/mail/sa-utils/files/sa-utils.in
Modified: head/mail/sa-utils/Makefile
==============================================================================
--- head/mail/sa-utils/Makefile Fri Apr 7 05:34:13 2017 (r437912)
+++ head/mail/sa-utils/Makefile Fri Apr 7 07:11:40 2017 (r437913)
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= sa-utils
-PORTVERSION= 0.02
-PORTREVISION= 2
+PORTVERSION= 0.03
CATEGORIES= mail
MASTER_SITES= # none
DISTFILES= # none
Modified: head/mail/sa-utils/files/sa-utils.in
==============================================================================
--- head/mail/sa-utils/files/sa-utils.in Fri Apr 7 05:34:13 2017 (r437912)
+++ head/mail/sa-utils/files/sa-utils.in Fri Apr 7 07:11:40 2017 (r437913)
@@ -142,6 +142,16 @@ case "$daily_sa_enable" in
;;
esac
+ 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
+
update_rules || rc=$?
case ${rc} in
0)
More information about the svn-ports-head
mailing list