From: Aurelien Jarno Date: Sun, 16 Apr 2017 10:50:54 +0000 (+0200) Subject: dsa-puppet-stuff: check for puppet version instead of debian release X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=be0e4717bae14e5cc8c8c8e291366a0e0a8e17c9;p=mirror%2Fdsa-puppet.git dsa-puppet-stuff: check for puppet version instead of debian release As we might install backport versions of puppet. Signed-off-by: Aurelien Jarno --- diff --git a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb index 50ce9d9a0..0f772b565 100644 --- a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb +++ b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb @@ -5,7 +5,7 @@ SHELL=/bin/bash @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive -<% if scope.call_function('versioncmp', [@lsbmajdistrelease, '7']) <= 0 -%> +<% if scope.call_function('versioncmp', [@puppetversion.to_s, '3.0.0']) <= 0 -%> 34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi <% else -%> 34 */2 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 3600 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3000"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/puppet agent --onetime --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi