Merge pull request #511 from dheule/cron_fix

fix filter for new cron on sles12 sp2
remotes/origin/prometheus
Darko Poljak 8 years ago committed by GitHub
commit 8c817bc1ca
  1. 3
      cdist/conf/type/__cron/gencode-remote

@ -3,6 +3,7 @@
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
# 2013 Nico Schottelius (nico-cdist at schottelius.org)
# 2013 Thomas Oettli (otho at sfs.biz)
# 2017 Daniel Heule (hda at sfs.biz)
#
# This file is part of cdist.
#
@ -57,7 +58,7 @@ state_should="$(cat "$__object/parameter/state" 2>/dev/null || echo "present")"
# These are the old markers
prefix="#cdist:__cron/$__object_id"
suffix="#/cdist:__cron/$__object_id"
filter="^# DO NOT EDIT THIS FILE|^# \(.* installed on |^# \(Cron version V"
filter="^# DO NOT EDIT THIS FILE|^# \(.* installed on |^# \(Cron version V|^# \(Cronie version .\..\)$"
cat << DONE
crontab -u $user -l 2>/dev/null | grep -v -E "$filter" | awk -v prefix="$prefix" -v suffix="$suffix" '
{

Loading…
Cancel
Save