use correct network device

This commit is contained in:
rootzoll 2024-09-12 17:49:53 +02:00
parent 68e6d54a22
commit 9301408fee

View File

@ -79,8 +79,7 @@ fi
#############################################
# get local IP Range
localiprange=$(ip -o -4 addr show | awk '/scope global/ {last=$4} END {split(last, ip, "/"); split(ip[1], octets, "."); printf "%s.%s.%s.0/%s\n", octets[1], octets[2], octets[3], ip[2]}'
)
localiprange=$(ip -o -4 addr show ${networkDevice} | awk '/scope global/ {split($4,ip,"/"); split(ip[1],octets,"."); printf "%s.%s.%s.0/%s\n", octets[1], octets[2], octets[3], ip[2]}')
#############################################
# check DHCP