V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 55s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-12 20:13:01 +02:00
parent 0eb2b72d86
commit 3dc762283a
3 changed files with 71 additions and 33 deletions

View File

@@ -122,16 +122,11 @@ yaml_validator() {
# shellcheck disable=SC2312
var_link_ipv6=$(ping -q -c 1 -W 1 -6 debian.org > /dev/null 2>&1 && echo "true" || echo "false")
if [[ -f "/var/lib/dhcp/dhclient.${var_auto_nic}.leases" ]]; then
# shellcheck disable=SC2312
var_auto_fqdn=$(grep -m1 'option host-name' "/var/lib/dhcp/dhclient.${var_auto_nic}.leases" | sed -E 's/.*"([^"]+)".*/\1/')
else
var_auto_fqdn=""
fi
# shellcheck disable=SC2312
var_auto_fqdn="$( getent hosts "${var_auto_ipv4}" | awk '{print $2}' | head -n1 )"
var_auto_fqdn="${var_auto_fqdn:-$(dig +short -x "${var_auto_ipv4}")}"
var_auto_fqdn="${var_auto_fqdn%.}"
var_auto_fqdn="${var_auto_fqdn,,}"
do_log "info" "file_only" "1252() Live environment network check: Auto NIC ='${var_auto_nic}'."
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 ='${var_auto_ipv4}'."