]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Roll back the hostname->uname change in rev 1.10. It turns
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 5 Feb 2021 22:03:40 +0000 (22:03 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Feb 2021 22:35:14 +0000 (09:35 +1100)
out uname -n doesn't do what we need for some platforms in portable, so we'll
fix the original problem (that some other platforms don't have hostname at
all) by providing wrapper function to implement it.

OpenBSD-Regress-ID: 827a707d6201d5a8e196a8c28aec1d2c76c52341

regress/percent.sh

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