From b1d4d9bba1a5b306ff0eb956fff602124c690f8a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 19 Oct 2016 15:24:44 +0100 Subject: [PATCH] Only display an ipv6 address if it exists --- src/freedombone-controlpanel | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 3f0f37f6..f4c7a741 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -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 '' }