summaryrefslogtreecommitdiff
path: root/lib/chef/dsl
diff options
context:
space:
mode:
authorStuart Preston <stuart@chef.io>2018-03-07 20:15:31 -0800
committerStuart Preston <stuart@chef.io>2018-03-07 20:15:31 -0800
commita8ee50ed5021e2897f5483049acdb36c1f23125c (patch)
tree5ad6510007607fdae38856d314ae20577c4c4690 /lib/chef/dsl
parente20bbea2f4a4201c3db645f6a2d14c793682e6cc (diff)
parent27de91563e5311cf17fdb53e7542db553787ec2f (diff)
downloadchef-a8ee50ed5021e2897f5483049acdb36c1f23125c.tar.gz
Merge branch 'master' into sp/powershell_exec
Signed-off-by: <>
Diffstat (limited to 'lib/chef/dsl')
-rw-r--r--lib/chef/dsl/reboot_pending.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/chef/dsl/reboot_pending.rb b/lib/chef/dsl/reboot_pending.rb
index fdd0f5a62b..2ebad7e039 100644
--- a/lib/chef/dsl/reboot_pending.rb
+++ b/lib/chef/dsl/reboot_pending.rb
@@ -44,14 +44,7 @@ class Chef
registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired') ||
# Vista + Server 2008 and newer may have reboots pending from CBS
- registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending') ||
-
- # The mere existence of the UpdateExeVolatile key should indicate a pending restart for certain updates
- # http://support.microsoft.com/kb/832475
- Chef::Platform.windows_server_2003? &&
- (registry_key_exists?('HKLM\SOFTWARE\Microsoft\Updates\UpdateExeVolatile') &&
- !registry_get_values('HKLM\SOFTWARE\Microsoft\Updates\UpdateExeVolatile').select { |v| v[:name] == "Flags" }[0].nil? &&
- [1, 2, 3].include?(registry_get_values('HKLM\SOFTWARE\Microsoft\Updates\UpdateExeVolatile').select { |v| v[:name] == "Flags" }[0][:data]))
+ registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending')
elsif platform?("ubuntu")
# This should work for Debian as well if update-notifier-common happens to be installed. We need an API for that.
File.exists?("/var/run/reboot-required")