]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Some platforms don't have "hostname -s", so use cut to trim
authordtucker@openbsd.org <dtucker@openbsd.org>
Sat, 4 Apr 2020 22:14:26 +0000 (22:14 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Sat, 4 Apr 2020 22:40:46 +0000 (08:40 +1000)
short hostname instead.

OpenBSD-Regress-ID: ebcf36a6fdf287c9336b0d4f6fc9f793c05307a7

regress/percent.sh

index ef37ab22c09a82545cc78c271ee58c9180bc42e5..a09f1612424e38beb75820d850773cd18430cf1d 100644 (file)
@@ -1,11 +1,11 @@
-#      $OpenBSD: percent.sh,v 1.4 2020/04/03 07:53:10 dtucker Exp $
+#      $OpenBSD: percent.sh,v 1.5 2020/04/04 22:14:26 dtucker Exp $
 #      Placed in the Public Domain.
 
 tid="percent expansions"
 
 USER=`id -u -n`
 USERID=`id -u`
-HOST=`hostname -s`
+HOST=`hostname | cut -f1 -d.`
 HOSTNAME=`hostname`
 
 # Localcommand is evaluated after connection because %T is not available