From 673a06b54d6d570d70ff6fb8318a94190ab48055 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 17 Oct 2013 08:32:09 -1000 Subject: [PATCH] hosts/gentoo: use subprocess machinery /cc @timgus --- plugins/hosts/gentoo/host.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/hosts/gentoo/host.rb b/plugins/hosts/gentoo/host.rb index 3ae961ce4..52b6b34c5 100644 --- a/plugins/hosts/gentoo/host.rb +++ b/plugins/hosts/gentoo/host.rb @@ -1,4 +1,5 @@ require "vagrant" +require "vagrant/util/subprocess" require Vagrant.source_root.join("plugins/hosts/linux/host") @@ -31,7 +32,8 @@ module VagrantPlugins # Check for systemd presence from current processes. def systemd? - `ps -o comm= 1`.chomp == 'systemd' + result = Vagrant::Util::Subprocess.execute("ps", "-o", "comm=", "1") + return result.stdout.chomp == "systemd" end end end