svn commit: r438194 - in head/sysutils/bsdstats: . files

Carlos J. Puga Medina cpm at FreeBSD.org
Mon Apr 10 17:57:32 UTC 2017


Author: cpm
Date: Mon Apr 10 17:57:30 2017
New Revision: 438194
URL: https://svnweb.freebsd.org/changeset/ports/438194

Log:
  - Use anticongestion instead of simply sleeping.
  - Bump PORTREVISION
  
  svn r316342 added a common anticongestion routine that all periodic scripts should
  use instead of simply calling sleep. To test if it's available, a port should
  check for the anticongestion_sleeptime variable.
  
  PR:		218283
  Submitted by:	asomers
  Approved by:	Yuri Victorovich <yuri at rawbw.com> (maintainer)

Modified:
  head/sysutils/bsdstats/Makefile
  head/sysutils/bsdstats/files/300.statistics.in

Modified: head/sysutils/bsdstats/Makefile
==============================================================================
--- head/sysutils/bsdstats/Makefile	Mon Apr 10 17:32:58 2017	(r438193)
+++ head/sysutils/bsdstats/Makefile	Mon Apr 10 17:57:30 2017	(r438194)
@@ -3,7 +3,7 @@
 
 PORTNAME=	bsdstats
 PORTVERSION=	6.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 DISTFILES=
 

Modified: head/sysutils/bsdstats/files/300.statistics.in
==============================================================================
--- head/sysutils/bsdstats/files/300.statistics.in	Mon Apr 10 17:32:58 2017	(r438193)
+++ head/sysutils/bsdstats/files/300.statistics.in	Mon Apr 10 17:57:30 2017	(r438194)
@@ -494,8 +494,16 @@ report_all() {
   setup_proxies
   test_connection
   log "INIT" "Connected to ${checkin_server_description}"
-  # sleep random number of seconds by default
-  test X"$1" = X-nodelay || ${SLEEP} $(random)
+  # When non-interactive, sleep to reduce congestion on bsdstats.org
+  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
   # prepare
   get_id_token
   # begin


More information about the svn-ports-head mailing list