Puppet: System Administration Automated

Support

Ticket #648: crontab.rb.patch

File crontab.rb.patch, 0.5 kB (added by porridge, 2 years ago)

a patch that seems to work for us

  • crontab.rb.new

    old new  
    8686    # See if we can match the hash against an existing cron job. 
    8787    def self.match(hash) 
    8888        model.find_all { |obj| 
    89             obj.value(:user) == hash[:user] and obj.value(:command) == hash[:command] 
     89            obj.value(:user) == hash[:target] and obj.value(:command) == hash[:command] 
    9090        }.each do |obj| 
    9191            # we now have a cron job whose command exactly matches 
    9292            # let's see if the other fields match