From d59953642edea42bd5070aacaed1d14c18434be2 Mon Sep 17 00:00:00 2001
From: Arkaitz Jimenez <arkaitzj@gmail.com>
Date: Sat, 30 Mar 2013 22:15:39 +0100
Subject: [PATCH] crontab -l should be allowed to fail with "no crontab"
 without stopping exec

---
 cdist/conf/type/__cron/gencode-remote | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cdist/conf/type/__cron/gencode-remote b/cdist/conf/type/__cron/gencode-remote
index 37e0dc15..fac0170f 100755
--- a/cdist/conf/type/__cron/gencode-remote
+++ b/cdist/conf/type/__cron/gencode-remote
@@ -38,7 +38,7 @@ if [ "$state_is" != "$state_should" ]; then
       present)
          cat << DONE
 tmp=\$($mktemp)
-crontab -u $user -l > \$tmp
+crontab -u $user -l > \$tmp || true
 cat >> \$tmp << EOC
 $(cat "$__object/parameter/entry")
 EOC