fixed dns server formatting in network config

This commit is contained in:
2026-08-20 10:29:45 +02:00
parent f8cbeaf20e
commit 83a4876f49

View File

@@ -9,7 +9,7 @@ IP_ADDRESS=$(ip address show ${NIC} | grep -E "inet " | awk '{print $2}')
NETMASK=$(echo ${IP_ADDRESS} | sed 's/.*\///')
IP_ADDRESS=$(echo ${IP_ADDRESS} | sed 's/\/.*//')
GATEWAY=$(ip route | grep "default" | awk '{print $3}')
DNS_SERVERS=$(awk '/^nameserver/ {print $2}' /etc/resolv.conf)
DNS_SERVERS=$(awk '/^nameserver/ {print $2}' /etc/resolv.conf | xargs)
# Network interfaces (static address)
cat << EOF > /etc/network/interfaces