Skip to content

Commit b27e4c3

Browse files
authored
Merge pull request pi-hole#2725 from pi-hole/fix/get-ip-similar-subnets
Fix getting IP address in the presence of similar subnets
2 parents e3d9cf0 + 466fd79 commit b27e4c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

automated install/basic-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ find_IPv4_information() {
525525
fi
526526

527527
# Append the CIDR notation to the IP address, if valid_ip fails this should return 127.0.0.1/8
528-
IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}')
528+
IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}/" | awk '{print $4}' | awk 'END {print}')
529529
}
530530

531531
# Get available interfaces that are UP

0 commit comments

Comments
 (0)