removed host dependency

This commit is contained in:
litinoveweedle
2026-02-03 21:09:17 +01:00
parent 9789b9dab6
commit 8c5171b027

View File

@@ -72,7 +72,7 @@ _is_ip_address() {
return 1 # IPv4
elif [ "$1" != "${1#*:[0-9a-fA-F]}" ]; then
return 2 # IPv6
elif host "$1" >/dev/null 2>&1; then
elif getent ahosts "$1" >/dev/null 2>&1; then
return 3 # resolvable hostname
else
return 0 # neither IP nor resolvable hostname