Use a better check for systemd

Using `which systemctl` would return true on even non-systemd machines
during this transitional time.
This commit is contained in:
patrick brisbin 2012-10-26 14:16:04 -04:00
parent 6905513481
commit 8c7c345bc0
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ module VagrantPlugins
# This tests to see if systemd is used on the system. This is used # This tests to see if systemd is used on the system. This is used
# in newer versions of Arch, and requires a change in behavior. # in newer versions of Arch, and requires a change in behavior.
def systemd? def systemd?
Kernel.system("which systemctl &>/dev/null") `ps -o comm= 1`.chomp == 'systemd'
end end
end end
end end