From: Christian Hesse Date: Sun, 16 Oct 2022 11:39:24 +0000 (+0200) Subject: Fallback to `uname -n` on missing `hostname` in radtest (#4771) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2033c644313b4619c35fc8cfcab053f2735816;p=thirdparty%2Ffreeradius-server.git Fallback to `uname -n` on missing `hostname` in radtest (#4771) This should work without inetutils being installed, so add a fallback. Signed-off-by: Christian Hesse Signed-off-by: Christian Hesse --- diff --git a/src/bin/radtest.in b/src/bin/radtest.in index 11e929147ac..e15f92ed9b2 100644 --- a/src/bin/radtest.in +++ b/src/bin/radtest.in @@ -100,7 +100,7 @@ if [ "$7" ] then nas=$7 else - nas=`hostname` + nas=`(hostname || uname -n) 2>/dev/null | sed 1q` fi (