diff options
author | Sean Clemmer <sclemmer@bluejeans.com> | 2014-07-29 13:35:17 -0700 |
---|---|---|
committer | Bryan McLellan <btm@getchef.com> | 2014-08-18 08:14:28 -0700 |
commit | e231f4399e65da25dd6f3a9f9357fdc60ed8c553 (patch) | |
tree | dce3252777c94f8c8ff07e68fc4dbc5458b4a2ac /lib/chef/provider/cron.rb | |
parent | 7ac26d569691668981260bc937ab82eba1872dc0 (diff) | |
download | chef-e231f4399e65da25dd6f3a9f9357fdc60ed8c553.tar.gz |
Fixes the "cron" resource handling of special strings (e.g. @reboot, @yearly)
Diffstat (limited to 'lib/chef/provider/cron.rb')
-rw-r--r-- | lib/chef/provider/cron.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb index 1be15f9f5f..c3be9746df 100644 --- a/lib/chef/provider/cron.rb +++ b/lib/chef/provider/cron.rb @@ -118,6 +118,12 @@ class Chef when ENV_PATTERN crontab << line unless cron_found next + when SPECIAL_PATTERN + if cron_found + cron_found = false + crontab << newcron + next + end when CRON_PATTERN if cron_found cron_found = false @@ -163,6 +169,11 @@ class Chef next when ENV_PATTERN next if cron_found + when SPECIAL_PATTERN + if cron_found + cron_found = false + next + end when CRON_PATTERN if cron_found cron_found = false |