as requested change to test to command:`which`
This commit is contained in:
parent
a5deb20dcb
commit
de62baed6b
|
@ -6,7 +6,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
comm = machine.communicate
|
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"
|
command = "LANG=en ip addr | grep -Po 'inet \\K[\\d.]+' | grep -v 127.0.0.1"
|
||||||
else
|
else
|
||||||
command = "LANG=en ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'"
|
command = "LANG=en ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'"
|
||||||
|
|
Loading…
Reference in New Issue