module Chef::Sugar::Init
Public Instance Methods
runit?(node)
click to toggle source
Determine if the current init system is runit.
@return [Boolean]
# File lib/chef/sugar/init.rb, line 45 def runit?(node) File.executable?('/sbin/runit-init') end
systemd?(node)
click to toggle source
Determine if the current init system is systemd.
@return [Boolean]
# File lib/chef/sugar/init.rb, line 27 def systemd?(node) File.exist?('/bin/systemctl') end
upstart?(node)
click to toggle source
Determine if the current init system is upstart.
@return [Boolean]
# File lib/chef/sugar/init.rb, line 36 def upstart?(node) File.executable?('/sbin/initctl') end