as requested change to test to command:`which`

This commit is contained in:
Bas van der Vlies 2018-01-08 08:53:33 +01:00
parent a5deb20dcb
commit de62baed6b
1 changed files with 1 additions and 1 deletions

View File

@ -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 }'"