mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Replace ifconfig with ip addr
This commit is contained in:
parent
0deb63911b
commit
6ffad6104f
@ -56,7 +56,7 @@ module VagrantPlugins
|
|||||||
return ssh_host if ping(ssh_host)
|
return ssh_host if ping(ssh_host)
|
||||||
|
|
||||||
# check other ips
|
# check other ips
|
||||||
command = "LANG=en ifconfig |grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'"
|
command = "ip addr show | grep -i 'inet ' | grep -v '127.0.0.1' | tr -s ' ' | cut -d' ' -f3 | cut -d'/' -f 1"
|
||||||
result = ""
|
result = ""
|
||||||
machine.communicate.execute(command) do |type, data|
|
machine.communicate.execute(command) do |type, data|
|
||||||
result << data if type == :stdout
|
result << data if type == :stdout
|
||||||
|
Loading…
Reference in New Issue
Block a user