More reliable / simple way to list IPs

This commit is contained in:
Alexandre Aubin 2018-09-04 02:31:28 +02:00
parent 55068ff9a3
commit 98d5a272a4

View file

@ -167,9 +167,7 @@ function rebuild_ynhdev()
function show_vm_ip() function show_vm_ip()
{ {
assert_inside_vm assert_inside_vm
# Print IP hostname --all-ip-addresses | tr ' ' '\n'
ip=$(/bin/ip a | grep 'inet 192.168' | awk -F " " '{print $2}' | awk -F "/" '{print $1}')
echo "IP: $ip"
} }
function use_git() function use_git()