changeset 266:33541d73d6d7

RHEL8 at least has different syntax for which, this should allow both to work without incident
author Steve Huston <huston@princeton.edu>
date Wed, 24 Apr 2024 16:53:52 -0400
parents df0b24d4fabd
children 857bf32fbaab
files .ssh/athome
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.ssh/athome	Wed Apr 24 16:15:40 2024 -0400
+++ b/.ssh/athome	Wed Apr 24 16:53:52 2024 -0400
@@ -20,7 +20,7 @@
 # Now how to get the home IP.. let's loop through ways it's possible
 HOMEDNS="b6800200.eero.online"
 
-if which -s getent awk ; then
+if which -s getent awk > /dev/null 2>&1 ; then
   HOMEIP=`getent ahostsv4 $HOMEDNS | awk '{print $1; exit}'`
 elif which -s dig ; then
   HOMEIP=`dig +short $HOMEDNS`