From c50925cab5b6a8d5647092a46a5893fff944c4e9 Mon Sep 17 00:00:00 2001 From: Daniel Heule Date: Thu, 19 Dec 2013 14:45:55 +0100 Subject: [PATCH] bugfix in __cron type, was a wrong quoting --- cdist/conf/type/__cron/explorer/entry | 0 cdist/conf/type/__cron/gencode-remote | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 cdist/conf/type/__cron/explorer/entry mode change 100644 => 100755 cdist/conf/type/__cron/gencode-remote diff --git a/cdist/conf/type/__cron/explorer/entry b/cdist/conf/type/__cron/explorer/entry old mode 100755 new mode 100644 diff --git a/cdist/conf/type/__cron/gencode-remote b/cdist/conf/type/__cron/gencode-remote old mode 100644 new mode 100755 index e84cf66a..712eb1a1 --- a/cdist/conf/type/__cron/gencode-remote +++ b/cdist/conf/type/__cron/gencode-remote @@ -60,7 +60,7 @@ prefix="#cdist:__cron/$__object_id" suffix="#/cdist:__cron/$__object_id" filter="^# DO NOT EDIT THIS FILE|^# \(.* installed on |^# \(Cron version V" cat << DONE -crontab -u $user -l | grep -v -E "$filter" | awk -v prefix="$prefix" -v suffix="$suffix" ' +crontab -u $user -l 2>/dev/null | grep -v -E "$filter" | awk -v prefix="$prefix" -v suffix="$suffix" ' { if (index(\$0,prefix)) { triggered=1 @@ -79,12 +79,12 @@ DONE case "$state_should" in present) echo "(" - echo "crontab -u $user -l | grep -v -E "$filter" 2>/dev/null || true" + echo "crontab -u $user -l 2>/dev/null | grep -v -E \"$filter\" 2>/dev/null || true" echo "echo '$entry'" echo ") | crontab -u $user -" ;; absent) - echo "( crontab -u $user -l | grep -v -E "$filter" 2>/dev/null || true ) | \\" + echo "( crontab -u $user -l 2>/dev/null | grep -v -E \"$filter\" 2>/dev/null || true ) | \\" echo "grep -v \"# $name\\$\" | crontab -u $user -" ;; esac