svn commit: r441283 - in head/dns/ddclient: . files
Alan Somers
asomers at FreeBSD.org
Sat May 20 02:27:55 UTC 2017
Author: asomers (src committer)
Date: Sat May 20 02:27:54 2017
New Revision: 441283
URL: https://svnweb.freebsd.org/changeset/ports/441283
Log:
Use anticongestion in dns/ddclient
Introduced in src r316342, the anticongestion feature unifies multiple
periodic scripts' disparate sleeps.
PR: 218442
Approved by: mjl at luckie.org.nz (maintainer)
Approved by: brd (ports)
Modified:
head/dns/ddclient/Makefile
head/dns/ddclient/files/ddclient_force.in
Modified: head/dns/ddclient/Makefile
==============================================================================
--- head/dns/ddclient/Makefile Sat May 20 02:27:45 2017 (r441282)
+++ head/dns/ddclient/Makefile Sat May 20 02:27:54 2017 (r441283)
@@ -3,7 +3,7 @@
PORTNAME= ddclient
PORTVERSION= 3.8.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= dns
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
Modified: head/dns/ddclient/files/ddclient_force.in
==============================================================================
--- head/dns/ddclient/files/ddclient_force.in Sat May 20 02:27:45 2017 (r441282)
+++ head/dns/ddclient/files/ddclient_force.in Sat May 20 02:27:54 2017 (r441283)
@@ -16,9 +16,16 @@ case "$daily_ddclient_force_enable" in
echo
echo 'Forcing ddclient update:'
- out=`%%PREFIX%%/sbin/ddclient -force`
- echo "$out"
- rc=0
+ # sleep randomly to reduce congestion on dyn dns server. In
+ # FreeBSD 12.0 the anticongestion function should be used
+ # instead of a hard-coded sleep
+ if [ -n "$anticongestion_sleeptime" ]; then
+ anticongestion
+ else
+ sleep `jot -r 1 0 900`
+ fi
+
+ %%PREFIX%%/sbin/ddclient -force || rc=3
;;
*)
rc=0
More information about the svn-ports-head
mailing list