def action_reconfig
if @current_resource.version == nil then
Chef::Log.debug("#{@new_resource} is NOT installed - nothing to do")
return
end
unless @new_resource.response_file then
Chef::Log.debug("#{@new_resource} no response_file provided - nothing to do")
return
end
if preseed_file = get_preseed_file(@new_resource.package_name, @current_resource.version)
converge_by("reconfigure package #{@new_resource.package_name}") do
preseed_package(preseed_file)
status = reconfig_package(@new_resource.package_name, @current_resource.version)
Chef::Log.info("#{@new_resource} reconfigured")
end
else
Chef::Log.debug("#{@new_resource} preseeding has not changed - nothing to do")
end
end