From 8acf5c341d2d477add2e773a66a47437663a9a43 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Thu, 21 Mar 2013 14:37:02 -0400 Subject: Update make-ssh-known-hosts to deal with aliases --- bin/make-ssh-known-hosts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/make-ssh-known-hosts b/bin/make-ssh-known-hosts index 34901af..77e31ed 100755 --- a/bin/make-ssh-known-hosts +++ b/bin/make-ssh-known-hosts @@ -26,8 +26,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. for i in "$@"; do - IP4=$(host -t A "$i" | awk '{ print "," $NF }'); - IP6=$(host -t AAAA "$i" | awk '{ print "," $NF }'); + IP4=$(host -t A "$i" | awk '/address/ { print "," $NF }'); + IP6=$(host -t AAAA "$i" | awk '/address/ { print "," $NF }'); if test "${IP4}" = ",record"; then IP4=""; fi -- cgit v1.2.3