bug fix
authorIan Kelling <iank@fsf.org>
Wed, 22 May 2024 00:12:20 +0000 (20:12 -0400)
committerIan Kelling <iank@fsf.org>
Wed, 22 May 2024 00:12:20 +0000 (20:12 -0400)
fai/config/distro-install-common/ethusb-static

index f6cdd62f959a5e383e75d841952a368402ad6c9b..c55b93dd63d23e7092ddb18e072fd9f7df994299 100755 (executable)
@@ -99,7 +99,10 @@ dns=8.8.8.4;8.8.8.8;"
     exit 1
   fi
 else
-  ip=$(getent ahostsv4 $HOSTNAME.office.fsf.org | awk '{ print $1 }' | head -n1)
+  if ! type -p dig &>/dev/null; then
+    apt-get install dig
+  fi
+  ip=$(dig +short @192.168.0.25 $HOSTNAME.office.fsf.org)
   net_info="address1=$ip/24,192.168.0.1
 dns=192.168.0.10;192.168.0.25;"
 fi