Browse Source

Only display an ipv6 address if it exists

Bob Mottram 8 years ago
parent
commit
b1d4d9bba1
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      src/freedombone-controlpanel

+ 6
- 1
src/freedombone-controlpanel View File

368
     echo 'IP/DNS addresses'
368
     echo 'IP/DNS addresses'
369
     echo '================'
369
     echo '================'
370
     echo ''
370
     echo ''
371
-    echo "IPv4: $(get_ipv4_address)    IPv6: $(get_ipv6_address)"
371
+    echo -n "IPv4: $(get_ipv4_address)"
372
+    ipv6_address="$(get_ipv6_address)"
373
+    if [ ${#ipv6_address} -gt 0 ]; then
374
+        echo "    IPv6: $(ipv6_address)"
375
+    fi
376
+    echo ''
372
     echo ''
377
     echo ''
373
 }
378
 }
374
 
379