diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-06-02 16:36:46 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-06-02 18:52:12 -0700 |
commit | 23e3c799803ac1800149e27271c6168539cea25e (patch) | |
tree | c6394473fc32f9b30b50a309de765940a21d2c8c /lib/chef/provider/package/aix.rb | |
parent | 025cabb7158fb02a89250ef91cc94ce3b3c38648 (diff) | |
download | chef-23e3c799803ac1800149e27271c6168539cea25e.tar.gz |
fix package timeout attribute
updates all the shell_out calls to respect the timeout which is passed
on the new_resource.
the old `Chef::Config` yum timeout values are still respected and will
override the default.
the default of 900 seconds is preserved.
Diffstat (limited to 'lib/chef/provider/package/aix.rb')
-rw-r--r-- | lib/chef/provider/package/aix.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/provider/package/aix.rb b/lib/chef/provider/package/aix.rb index 0e1b1c1d26..b97db9d061 100644 --- a/lib/chef/provider/package/aix.rb +++ b/lib/chef/provider/package/aix.rb @@ -52,7 +52,7 @@ class Chef @package_source_found = ::File.exists?(@new_resource.source) if @package_source_found Chef::Log.debug("#{@new_resource} checking pkg status") - ret = shell_out("installp -L -d #{@new_resource.source}") + ret = shell_out_with_timeout("installp -L -d #{@new_resource.source}") ret.stdout.each_line do | line | case line when /#{@new_resource.package_name}:/ @@ -65,7 +65,7 @@ class Chef end Chef::Log.debug("#{@new_resource} checking install state") - ret = shell_out("lslpp -lcq #{@current_resource.package_name}") + ret = shell_out_with_timeout("lslpp -lcq #{@current_resource.package_name}") ret.stdout.each_line do | line | case line when /#{@current_resource.package_name}/ @@ -84,7 +84,7 @@ class Chef def candidate_version return @candidate_version if @candidate_version - ret = shell_out("installp -L -d #{@new_resource.source}") + ret = shell_out_with_timeout("installp -L -d #{@new_resource.source}") ret.stdout.each_line do | line | case line when /\w:#{Regexp.escape(@new_resource.package_name)}:(.*)/ @@ -110,10 +110,10 @@ class Chef def install_package(name, version) Chef::Log.debug("#{@new_resource} package install options: #{@new_resource.options}") if @new_resource.options.nil? - shell_out!( "installp -aYF -d #{@new_resource.source} #{@new_resource.package_name}" ) + shell_out_with_timeout!( "installp -aYF -d #{@new_resource.source} #{@new_resource.package_name}" ) Chef::Log.debug("#{@new_resource} installed version #{@new_resource.version} from: #{@new_resource.source}") else - shell_out!( "installp -aYF #{expand_options(@new_resource.options)} -d #{@new_resource.source} #{@new_resource.package_name}" ) + shell_out_with_timeout!( "installp -aYF #{expand_options(@new_resource.options)} -d #{@new_resource.source} #{@new_resource.package_name}" ) Chef::Log.debug("#{@new_resource} installed version #{@new_resource.version} from: #{@new_resource.source}") end end @@ -122,10 +122,10 @@ class Chef def remove_package(name, version) if @new_resource.options.nil? - shell_out!( "installp -u #{name}" ) + shell_out_with_timeout!( "installp -u #{name}" ) Chef::Log.debug("#{@new_resource} removed version #{@new_resource.version}") else - shell_out!( "installp -u #{expand_options(@new_resource.options)} #{name}" ) + shell_out_with_timeout!( "installp -u #{expand_options(@new_resource.options)} #{name}" ) Chef::Log.debug("#{@new_resource} removed version #{@new_resource.version}") end end |