Module: Chef::Sugar::Init
Instance Method Summary collapse
-
#runit?(node) ⇒ Boolean
Determine if the current init system is runit.
-
#systemd?(node) ⇒ Boolean
Determine if the current init system is systemd.
-
#upstart?(node) ⇒ Boolean
Determine if the current init system is upstart.
Instance Method Details
#runit?(node) ⇒ Boolean
Determine if the current init system is runit.
45 46 47 |
# File 'lib/chef/sugar/init.rb', line 45 def runit?(node) File.executable?('/sbin/runit-init') end |
#systemd?(node) ⇒ Boolean
Determine if the current init system is systemd.
27 28 29 |
# File 'lib/chef/sugar/init.rb', line 27 def systemd?(node) File.exist?('/bin/systemctl') end |
#upstart?(node) ⇒ Boolean
Determine if the current init system is upstart.
36 37 38 |
# File 'lib/chef/sugar/init.rb', line 36 def upstart?(node) File.executable?('/sbin/initctl') end |