lib/chef/provider/cron.rb in chef-0.9.8 vs lib/chef/provider/cron.rb in chef-0.9.10.rc.0
- old
+ new
@@ -131,11 +131,11 @@
status = popen4("crontab -u #{@new_resource.user} -", :waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each_line { |line| stdin.puts "#{line}" }
end
Chef::Log.info("Updated cron '#{@new_resource.name}'")
- @new_resource.updated = true
+ @new_resource.updated_by_last_action(true)
else
unless @cron_empty
status = popen4("crontab -l -u #{@new_resource.user}") do |pid, stdin, stdout, stderr|
stdout.each { |line| crontab << line }
end
@@ -145,11 +145,11 @@
status = popen4("crontab -u #{@new_resource.user} -", :waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each_line { |line| stdin.puts "#{line}" }
end
Chef::Log.info("Added cron '#{@new_resource.name}'")
- @new_resource.updated = true
+ @new_resource.updated_by_last_action(true)
end
end
def action_delete
if @cron_exists
@@ -175,10 +175,10 @@
status = popen4("crontab -u #{@new_resource.user} -", :waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each_line { |line| stdin.puts "#{line}" }
end
Chef::Log.debug("Deleted cron '#{@new_resource.name}'")
- @new_resource.updated = true
+ @new_resource.updated_by_last_action(true)
end
end
end
end