aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCĂ©dric Krier <ced@b2ck.com>2024-10-27 09:05:14 +0100
committerSebastian Pipping <sebastian@pipping.org>2024-10-28 18:02:48 +0100
commit5e76e65636d927c2a8a439e53265a8def659cea2 (patch)
treef6f3536a39499a1a75c3d8f6a22d9b7b0d45c56b
parentTravis CI: Clean up (diff)
downloadporticron-5e76e65636d927c2a8a439e53265a8def659cea2.tar.gz
porticron-5e76e65636d927c2a8a439e53265a8def659cea2.tar.bz2
porticron-5e76e65636d927c2a8a439e53265a8def659cea2.zip
Replace dig by getent
Closes: https://github.com/gentoo/porticron/pull/10 Signed-off-by: Sebastian Pipping <sebastian@pipping.org>
-rwxr-xr-xbin/porticron2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/porticron b/bin/porticron
index 3b06afb..19ccbb1 100755
--- a/bin/porticron
+++ b/bin/porticron
@@ -116,7 +116,7 @@ fi
SCRIPT_NAME=$(basename $0)
: ${FQDN:=$(hostname --fqdn)}
: ${HOST:=$(hostname -s)}
-IP=$(dig +short ${FQDN} | tr '\n' ' ')
+IP=$(getent hosts ${FQDN} | cut -d ' ' -f 1)
: ${DATE:=$(date -R)}
: ${PORTDIR:=$(portageq get_repo_path $(portageq envvar EROOT) gentoo)}