summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2010-01-14 14:14:19 +1100
committerJames Turnbull <james@lovedthanlost.net>2010-01-14 14:14:19 +1100
commit441879f7999f4724e8ab344e796015a7ffbfb21b (patch)
tree11f7207748744c70911425906906f3828b5d71b5 /lib/puppet/provider
parentf7e14356ad7781fafa52a459d3c24372fa6c0900 (diff)
downloadpuppet-441879f7999f4724e8ab344e796015a7ffbfb21b.tar.gz
puppet-441879f7999f4724e8ab344e796015a7ffbfb21b.tar.xz
puppet-441879f7999f4724e8ab344e796015a7ffbfb21b.zip
Revert "Fix #2845 Cron entries using "special" parameter lose their title when changed"
This reverts commit c99f394bf8c10d13f3fa7d3ab7ab43ecf454c081. The fix broke cron jobs in 0.25.3 and was reverted for the 0.25.4 release.
Diffstat (limited to 'lib/puppet/provider')
-rwxr-xr-xlib/puppet/provider/cron/crontab.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/puppet/provider/cron/crontab.rb b/lib/puppet/provider/cron/crontab.rb
index 28ef05974..6dee2e515 100755
--- a/lib/puppet/provider/cron/crontab.rb
+++ b/lib/puppet/provider/cron/crontab.rb
@@ -27,13 +27,18 @@ Puppet::Type.type(:cron).provide(:crontab,
text_line :environment, :match => %r{^\w+=}
- crontab = record_line :crontab, :fields => %w{special minute hour monthday month weekday command},
- :match => %r{^\s*(?:@(\w+)|(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+))\s+(.+)$},
- :optional => %w{special minute hour weekday month monthday}, :absent => "*"
+ record_line :freebsd_special, :fields => %w{special command},
+ :match => %r{^@(\w+)\s+(.+)$}, :pre_gen => proc { |record|
+ record[:special] = "@" + record[:special]
+ }
+
+ crontab = record_line :crontab, :fields => %w{minute hour monthday month weekday command},
+ :match => %r{^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$},
+ :optional => %w{minute hour weekday month monthday}, :absent => "*"
class << crontab
def numeric_fields
- fields - [:command, :special]
+ fields - [:command]
end
# Do some post-processing of the parsed record. Basically just
# split the numeric fields on ','.