diff options
Diffstat (limited to 'lib/chef/provider/package/dpkg.rb')
-rw-r--r-- | lib/chef/provider/package/dpkg.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/provider/package/dpkg.rb b/lib/chef/provider/package/dpkg.rb index 11691a2479..a262f1ab1a 100644 --- a/lib/chef/provider/package/dpkg.rb +++ b/lib/chef/provider/package/dpkg.rb @@ -62,7 +62,7 @@ class Chef # Get information from the package if supplied Chef::Log.debug("#{@new_resource} checking dpkg status") - shell_out("dpkg-deb -W #{@new_resource.source}").stdout.each_line do |line| + shell_out_with_timeout("dpkg-deb -W #{@new_resource.source}").stdout.each_line do |line| if pkginfo = DPKG_INFO.match(line) @current_resource.package_name(pkginfo[1]) @new_resource.version(pkginfo[2]) @@ -79,7 +79,7 @@ class Chef # Check to see if it is installed package_installed = nil Chef::Log.debug("#{@new_resource} checking install state") - status = shell_out("dpkg -s #{@current_resource.package_name}") + status = shell_out_with_timeout("dpkg -s #{@current_resource.package_name}") status.stdout.each_line do |line| case line when DPKG_INSTALLED @@ -134,13 +134,13 @@ class Chef run_noninteractive("dpkg-reconfigure #{name}") end - # Runs command via shell_out with magic environment to disable + # Runs command via shell_out_with_timeout with magic environment to disable # interactive prompts. Command is run with default localization rather # than forcing locale to "C", so command output may not be stable. # # FIXME: This should be "LC_ALL" => "en_US.UTF-8" in order to stabilize the output and get UTF-8 def run_noninteractive(command) - shell_out!(command, :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }) + shell_out_with_timeout!(command, :env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }) end end |