Skip to content

Commit 05e2f95

Browse files
Merge pull request #55 from JonasVautherin/pr-ahostsv4
Switch to ahostsv4
2 parents 1642e1a + a5a37dd commit 05e2f95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

edit_rcS.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function is_ip_valid {
1010
}
1111

1212
function 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

2626
function get_host_ip {

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function show_help {
1919
}
2020

2121
function 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

0 commit comments

Comments
 (0)