lib/chef/sugar/init.rb in chef-sugar-ng-4.2.2 vs lib/chef/sugar/init.rb in chef-sugar-ng-5.0.1
- old
+ new
@@ -23,11 +23,10 @@
# Determine if the current init system is systemd.
#
# @return [Boolean]
#
def systemd?(node)
- file = '/proc/1/comm'
- File.exist?(file) && IO.read(file).chomp == 'systemd'
+ File.exist?('/bin/systemctl')
end
#
# Determine if the current init system is upstart.
#