diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-15 06:52:29 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-15 06:52:29 +0000 |
| commit | e46d0072cf352c3555c45ab5d01e32615821de6a (patch) | |
| tree | 9263dfc7d2c0ece65e853537d8259278a58366e4 /lib/puppet | |
| parent | 0af8ad72f9d44c4fe8b817d724b562b4c38ca654 (diff) | |
| download | puppet-e46d0072cf352c3555c45ab5d01e32615821de6a.tar.gz puppet-e46d0072cf352c3555c45ab5d01e32615821de6a.tar.xz puppet-e46d0072cf352c3555c45ab5d01e32615821de6a.zip | |
Fixing #262. I somehow lost the line that only added a given user's jobs to each tab.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1607 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/filetype.rb | 8 | ||||
| -rwxr-xr-x | lib/puppet/type/cron.rb | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/filetype.rb b/lib/puppet/filetype.rb index 03bf70838..c70daafb3 100755 --- a/lib/puppet/filetype.rb +++ b/lib/puppet/filetype.rb @@ -136,14 +136,14 @@ module Puppet def path=(user) begin - uid = Puppet::Util.uid(user) + @uid = Puppet::Util.uid(user) rescue Puppet::Error => detail raise Puppet::Error, "Could not retrieve user %s" % user end - # We have to have the user name, not the uid, because some + # XXX We have to have the user name, not the uid, because some # systems *cough*linux*cough* require it that way - @path = uid + @path = user end # Read a specific @path's cron tab. @@ -174,7 +174,7 @@ module Puppet # does not think I should be allowed to set the @path to my own user name def cmdbase cmd = nil - if @path == Process.uid + if @uid == Process.uid return "crontab" else return "crontab -u #{@path}" diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index 30d88237c..ae12f4adf 100755 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -645,6 +645,7 @@ module Puppet @tabs[user] ||= @filetype.new(user) self.each do |inst| + next unless inst[:user] == user unless (@instances[user] and @instances[user].include? inst) @instances[user] ||= [] @instances[user] << inst |
