From de62baed6ba533b745f0e65acf8719f01d15d877 Mon Sep 17 00:00:00 2001 From: Bas van der Vlies Date: Mon, 8 Jan 2018 08:53:33 +0100 Subject: [PATCH] as requested change to test to command:`which` --- plugins/guests/linux/cap/read_ip_address.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/linux/cap/read_ip_address.rb b/plugins/guests/linux/cap/read_ip_address.rb index 64f4d95dc..4ccc1c566 100644 --- a/plugins/guests/linux/cap/read_ip_address.rb +++ b/plugins/guests/linux/cap/read_ip_address.rb @@ -6,7 +6,7 @@ module VagrantPlugins comm = machine.communicate - if comm.test("test -f /sbin/ip") + if comm.test("which ip") command = "LANG=en ip addr | grep -Po 'inet \\K[\\d.]+' | grep -v 127.0.0.1" else command = "LANG=en ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'"