]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: hostname is not specified by POSIX but uname -n is, so use
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 5 Feb 2021 06:01:58 +0000 (06:01 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Feb 2021 06:38:19 +0000 (17:38 +1100)
the latter for portability.  Patch from Geert Hendrickx via github PR#208.

OpenBSD-Regress-ID: d6a79c7c4d141a0d05ade4a042eb57dddbce89f3

regress/percent.sh

index 28781117e576dfd0287375ba6ce3e6026cbc33f5..e39f069616e0c5b0899cadd77d9ddda218045bbb 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: percent.sh,v 1.9 2020/07/17 07:10:24 dtucker Exp $
+#      $OpenBSD: percent.sh,v 1.10 2021/02/05 06:01:58 dtucker Exp $
 #      Placed in the Public Domain.
 
 tid="percent expansions"
@@ -10,8 +10,8 @@ fi
 
 USER=`id -u -n`
 USERID=`id -u`
-HOST=`hostname | cut -f1 -d.`
-HOSTNAME=`hostname`
+HOST=`uname -n | cut -f1 -d.`
+HOSTNAME=`uname -n`
 
 # Localcommand is evaluated after connection because %T is not available
 # until then.  Because of this we use a different method of exercising it,