View | Details | Raw Unified | Return to bug 261555
Collapse All | Expand All

(-)410.pkg-audit (-2 / +3 lines)
Lines 67-76 Link Here
67
67
68
	then=`stat -f '%m' "${basedir}${auditfile}" 2> /dev/null` || rc=3
68
	then=`stat -f '%m' "${basedir}${auditfile}" 2> /dev/null` || rc=3
69
	now=`date +%s` || rc=3
69
	now=`date +%s` || rc=3
70
	# Add 10 minutes of padding since the check is in seconds.
70
	# For expiry to mean "every N days", round up by anticongestion delay.
71
	# Also allow an extra 120 seconds (arbitrary) for processing delay.
71
	if [ $rc -ne 0 -o \
72
	if [ $rc -ne 0 -o \
72
		$(( 86400 \* "${security_status_pkgaudit_expiry}" )) \
73
		$(( 86400 \* "${security_status_pkgaudit_expiry}" )) \
73
		-le $(( ${now} - ${then} + 600 )) ]; then
74
		-le $(( ${now} - ${then} + ${anticongestion_sleeptime} + 120 )) ]; then
74
		# When non-interactive, sleep to reduce congestion on mirrors
75
		# When non-interactive, sleep to reduce congestion on mirrors
75
		anticongestion
76
		anticongestion
76
		${pkgcmd} ${pkgargs} audit -F $q || { rc=$?; [ $rc -lt 3 ] && rc=3; }
77
		${pkgcmd} ${pkgargs} audit -F $q || { rc=$?; [ $rc -lt 3 ] && rc=3; }

Return to bug 261555