diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-19 18:31:20 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-19 18:31:20 +0000 |
| commit | 69cf2fe278eb20b718663535bbae18965a1ece63 (patch) | |
| tree | 794f5e9fb3e4fbf84f284bd9f16c64820eb13c7b /lib/puppet | |
| parent | 0381cc1280c2c4c16687f7537962e9e1f1186d85 (diff) | |
| download | puppet-69cf2fe278eb20b718663535bbae18965a1ece63.tar.gz puppet-69cf2fe278eb20b718663535bbae18965a1ece63.tar.xz puppet-69cf2fe278eb20b718663535bbae18965a1ece63.zip | |
Adding a small fix to cron tabs; they will at least parse tabs that have env settings in them, although you still cannot, at this point, set them.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1216 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/type/cron.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index ea34f4629..917a6ffb1 100755 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -256,6 +256,14 @@ module Puppet class << self attr_accessor :filetype + + def cronobj(name) + if defined? @tabs + return @tabs[name] + else + return nil + end + end end attr_accessor :uid @@ -353,6 +361,10 @@ module Puppet when /^#/: # add other comments to the list as they are @instances[user] << line + when /^\s*(\w+)\s*=\s*(.+)\s*$/: + # Match env settings. For now, just chunk them in there, + # but eventually we'll want to manage them in the model somehow. + @instances[user] << line else if match = /^(\S+) (\S+) (\S+) (\S+) (\S+) (.+)$/.match(line) fields().zip(match.captures).each { |param, value| |
