From 381122c2ab40e9b48a52d6f0f27812687a988fbf Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 26 Aug 2009 10:43:23 +0200 Subject: [PATCH] Run puppet sync with timeout(1) if it's installed --- files/etc/cron.d/dsa-puppet-stuff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/etc/cron.d/dsa-puppet-stuff b/files/etc/cron.d/dsa-puppet-stuff index 72724ee03..f3aa1a5ba 100644 --- a/files/etc/cron.d/dsa-puppet-stuff +++ b/files/etc/cron.d/dsa-puppet-stuff @@ -1,3 +1,3 @@ SHELL=/bin/bash @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive -34 */4 * * * root [ ! -x /usr/sbin/puppetd ] || ( sleep $(( $RANDOM \% 3600 )) && /usr/sbin/puppetd --factsync -o --no-daemonize ) +34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 3600 )); if [ -x /usr/bin/timeout ]; then TO="timeout 3600"; else TO=""; fi; $TO /usr/sbin/puppetd --factsync -o --no-daemonize ; fi -- 2.20.1