Add reverse lookup on Internet address
authorSiraaj Khandkar <siraaj@khandkar.net>
Tue, 24 Nov 2020 03:10:04 +0000 (22:10 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Tue, 24 Nov 2020 03:10:04 +0000 (22:10 -0500)
home/lib/login_functions.sh

index dbde373..9442579 100644 (file)
@@ -539,9 +539,12 @@ status() {
 
     echo
 
+    local -r internet_addr=$(internet_addr 0.5)
+    local -r internet_ptr=$(host -W 1 "$internet_addr" | awk 'NR == 1 {print $NF}' )
+
     echo 'net'
     echo "${indent_unit}internet"
-    echo "${indent_unit}${indent_unit}$(internet_addr 0.5)"
+    echo "${indent_unit}${indent_unit}$internet_addr  $internet_ptr"
     echo "${indent_unit}if"
     (ifconfig; iwconfig) 2> /dev/null \
     | awk '
This page took 0.031463 seconds and 4 git commands to generate.