summaryrefslogtreecommitdiff
path: root/lib/chef/platform
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/platform')
-rw-r--r--lib/chef/platform/service_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb
index 3ef6ee4ae3..b392152651 100644
--- a/lib/chef/platform/service_helpers.rb
+++ b/lib/chef/platform/service_helpers.rb
@@ -47,7 +47,7 @@ class Chef
end
if ::File.exist?(Chef.path_to("/sbin/initctl"))
- service_resource_providers << :upstart
+ providers << :upstart
end
if ::File.exist?(Chef.path_to("/sbin/insserv"))
@@ -99,7 +99,7 @@ class Chef
def systemd_is_init?
::File.exist?(Chef.path_to("/proc/1/comm")) &&
- IO.read("/proc/1/comm").chomp == "systemd"
+ ::File.open(Chef.path_to("/proc/1/comm")).gets.chomp == "systemd"
end
def has_systemd_service_unit?(svc_name)