Update network.sh

This commit is contained in:
Kroese 2025-03-18 19:24:28 +01:00 committed by GitHub
parent 4c0cd1b290
commit 336a0e4907
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -442,7 +442,10 @@ if [[ "$DEBUG" == [Yy1]* ]]; then
line="Host: $HOST IP: $IP Gateway: $GATEWAY Interface: $VM_NET_DEV MAC: $VM_NET_MAC MTU: $mtu"
[[ "$MTU" != "0" ]] && [[ "$MTU" != "$mtu" ]] && line+=" ($MTU)"
info "$line"
[ -f /etc/resolv.conf ] && grep '^nameserver*' /etc/resolv.conf
if [ -f /etc/resolv.conf ]; then
nameservers=$(grep '^nameserver*' /etc/resolv.conf | head -c -1 | sed 's/nameserver //g;' | sed -z 's/\n/, /g')
[ -n "$nameservers" ] && info "Nameservers: $nameservers"
fi
echo
fi