fix filter for new cron on sles12 sp2
This commit is contained in:
parent
f9d1d2abb3
commit
0ad767fa29
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
|
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
|
||||||
# 2013 Nico Schottelius (nico-cdist at schottelius.org)
|
# 2013 Nico Schottelius (nico-cdist at schottelius.org)
|
||||||
# 2013 Thomas Oettli (otho at sfs.biz)
|
# 2013 Thomas Oettli (otho at sfs.biz)
|
||||||
|
# 2017 Daniel Heule (hda at sfs.biz)
|
||||||
#
|
#
|
||||||
# This file is part of cdist.
|
# 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
|
# These are the old markers
|
||||||
prefix="#cdist:__cron/$__object_id"
|
prefix="#cdist:__cron/$__object_id"
|
||||||
suffix="#/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
|
cat << DONE
|
||||||
crontab -u $user -l 2>/dev/null | 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" '
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue