summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mooring <paul@opscode.com>2012-06-27 13:21:23 -0700
committerPaul Mooring <paul@opscode.com>2012-06-27 13:21:23 -0700
commit0a679831f519afcbd9a51f405a548d658f45a597 (patch)
treeff01369d20b59f3dd4e2cecdda44fc3d87f535bd
parent2474490602c570156b79cd2c003d1412dff4d576 (diff)
downloadmixlib-shellout-0a679831f519afcbd9a51f405a548d658f45a597.tar.gz
Added timeout option to windows_package lwrp
-rw-r--r--providers/package.rb2
-rw-r--r--resources/package.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/providers/package.rb b/providers/package.rb
index 54bb30c..7f88e3b 100644
--- a/providers/package.rb
+++ b/providers/package.rb
@@ -120,7 +120,7 @@ def install_package(name,version)
Chef::Log.debug("Processing #{@new_resource} as a #{installer_type} installer.")
install_args = [cached_file(@new_resource.source, @new_resource.checksum), expand_options(unattended_installation_flags), expand_options(@new_resource.options)]
Chef::Log.info("Starting installation...this could take awhile.")
- shell_out!(sprintf(install_command_template, *install_args), {:returns => [0,42,127]})
+ shell_out!(sprintf(install_command_template, *install_args), {:timeout => @new_resource.timeout, :returns => [0,42,127]})
end
def remove_package(name, version)
diff --git a/resources/package.rb b/resources/package.rb
index 9729d9b..97c73f1 100644
--- a/resources/package.rb
+++ b/resources/package.rb
@@ -26,6 +26,7 @@ attribute :version, :kind_of => String
attribute :options, :kind_of => String
attribute :installer_type, :kind_of => Symbol, :default => nil, :equal_to => [:msi, :inno, :nsis, :wise, :installshield, :custom]
attribute :checksum, :kind_of => String
+attribute :timeout, :kind_of => Integer, :default => 600
# TODO
@@ -33,4 +34,4 @@ attribute :checksum, :kind_of => String
#attribute :response_file
# allow target dirtory of installation to be set
-#attribute :target_dir \ No newline at end of file
+#attribute :target_dir