Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge pull request #1559 from asomers/master
Baptiste Daroussin committed 9 years ago
commit bbf8b579f4dc4ca2f3535bfb343c463ac883edaa
parent 5ce39fe
1 file changed +6 -2
modified scripts/periodic/410.pkg-audit.in
@@ -55,8 +55,12 @@ audit_pkgs() {
	if [ $rc -ne 0 -o \
		$(( 86400 \* "${daily_status_security_pkgaudit_expiry:-2}" )) \
		-le $(( ${now} - ${then} + 600 )) ]; then
-
		# Random delay so the mirrors do not get slammed when run by periodic(8)
-
		if [ ! -t 0 ]; then
+
		# When non-interactive, sleep to reduce congestion on mirrors
+
		if [ -n "$anticongestion_sleeptime" ]; then
+
			# In FreeBSD 12.0 the anticongestion function should be
+
			# used instead of a hard-coded sleep
+
			anticongestion
+
		else
			sleep `jot -r 1 0 3600`
		fi
		${pkgcmd} ${pkgargs} audit -F $q || { rc=$?; [ $rc -lt 3 ] && rc=3; }