mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Override shellcheck with explanations.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
61c67849d7
commit
e8c2e26358
1 changed files with 4 additions and 2 deletions
|
@ -477,10 +477,12 @@ find_IPv4_information() {
|
||||||
route=$(ip route get 8.8.8.8)
|
route=$(ip route get 8.8.8.8)
|
||||||
|
|
||||||
# Get just the interface IPv4 address
|
# Get just the interface IPv4 address
|
||||||
# shellcheck disable=SC2059
|
# shellcheck disable=SC2059,SC2086
|
||||||
|
# disabled as we intentionally want to split on whitespace and have printf populate
|
||||||
|
# the variable with just the first field.
|
||||||
printf -v IPv4bare "$(printf ${route#*src })"
|
printf -v IPv4bare "$(printf ${route#*src })"
|
||||||
# Get the default gateway IPv4 address (the way to reach the Internet)
|
# Get the default gateway IPv4 address (the way to reach the Internet)
|
||||||
# shellcheck disable=SC2059
|
# shellcheck disable=SC2059,SC2086
|
||||||
printf -v IPv4gw "$(printf ${route#*via })"
|
printf -v IPv4gw "$(printf ${route#*via })"
|
||||||
|
|
||||||
if ! valid_ip "${IPv4bare}" ; then
|
if ! valid_ip "${IPv4bare}" ; then
|
||||||
|
|
Loading…
Reference in a new issue