Only display an ipv6 address if it exists
This commit is contained in:
parent
766fe08689
commit
b1d4d9bba1
|
@ -368,7 +368,12 @@ function show_ip_addresses {
|
|||
echo 'IP/DNS addresses'
|
||||
echo '================'
|
||||
echo ''
|
||||
echo "IPv4: $(get_ipv4_address) IPv6: $(get_ipv6_address)"
|
||||
echo -n "IPv4: $(get_ipv4_address)"
|
||||
ipv6_address="$(get_ipv6_address)"
|
||||
if [ ${#ipv6_address} -gt 0 ]; then
|
||||
echo " IPv6: $(ipv6_address)"
|
||||
fi
|
||||
echo ''
|
||||
echo ''
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue