Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstart: install inotify-tools only once (avoid CHEF-3694 warning). #239

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,15 @@ def service_create_sysv

def service_create_upstart
# The upstart init script requires inotifywait, which is in inotify-tools
package 'inotify-tools' do
action :nothing
end.run_action(:install)
# For clarity, install the package here but do it only once (no CHEF-3694).
begin
run_context.resource_collection.find(:package => 'inotify-tools')
# If we get here then we already installed the resource the first time.
rescue Chef::Exceptions::ResourceNotFound
package('inotify-tools') do
action :nothing
end.run_action(:install)
end

template "/etc/init/#{service_name}.conf" do
source service_template
Expand Down