mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-11 14:34:44 +00:00
Handle lack of IPv6 gracefully.
This commit is contained in:
parent
7729ddab30
commit
c41d543d81
1 changed files with 4 additions and 0 deletions
|
@ -96,8 +96,12 @@ function ipCheck {
|
|||
echo "::: Writing local IPs to logfile"
|
||||
IPADDR=$(ip a | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "inet") print $(i+1) }')
|
||||
echo "$IPADDR" >> ${DEBUG_LOG}
|
||||
|
||||
IP6ADDR=$(ip a | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "inet6") print $(i+1) }')
|
||||
if [ -n "$IP6ADDR" ]
|
||||
then
|
||||
echo "$IP6ADDR" >> ${DEBUG_LOG}
|
||||
fi
|
||||
echo >> ${DEBUG_LOG}
|
||||
|
||||
echo "::: Locating default gateway and checking connectivity"
|
||||
|
|
Loading…
Reference in a new issue