From 9301408fee3053ec9f9df1a5b34e43f537bdc7ea Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 12 Sep 2024 17:49:53 +0200 Subject: [PATCH] use correct network device --- home.admin/config.scripts/internet.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home.admin/config.scripts/internet.sh b/home.admin/config.scripts/internet.sh index 9c9cf40d..a9df6b4d 100755 --- a/home.admin/config.scripts/internet.sh +++ b/home.admin/config.scripts/internet.sh @@ -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