File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function is_ip_valid {
1010}
1111
1212function is_docker_vm {
13- getent hosts host.docker.internal > /dev/null 2>&1
13+ getent ahostsv4 host.docker.internal > /dev/null 2>&1
1414 return $?
1515}
1616
@@ -20,7 +20,7 @@ function get_vm_host_ip {
2020 exit 1
2121 fi
2222
23- echo " $( getent hosts host.docker.internal | awk ' { print $1 }' ) "
23+ echo " $( getent ahostsv4 host.docker.internal | awk ' { print $1 }' ) "
2424}
2525
2626function get_host_ip {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function show_help {
1919}
2020
2121function get_ip {
22- output=$( getent hosts " $1 " | awk ' {print $1}' )
22+ output=$( getent ahostsv4 " $1 " | awk ' {print $1}' )
2323 if [ -z $output ];
2424 then
2525 # No output, assume IP
You can’t perform that action at this time.
0 commit comments