mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-18 05:41:47 +01:00
* #3949 local ip range detection that also works for VMs
This commit is contained in:
parent
e6a8753212
commit
2f2909ccaf
@ -79,7 +79,7 @@ fi
|
||||
|
||||
#############################################
|
||||
# get local IP Range
|
||||
localiprange=$(ip addr | grep 'state UP' -A2 | grep -E -v 'docker0|veth' | grep 'eth0\|wlan0\|enp0\|inet' | tail -n1 | awk '{print $2}' | awk -F. '{print $1"."$2"."$3".0/24"}')
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user