Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2017 02:27:54 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r441283 - in head/dns/ddclient: . files
Message-ID:  <201705200227.v4K2Rsa0056065@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705200227.v4K2Rsa0056065>