[openssh-commits] [openssh] 02/02: Add a hostname function for systems that don't have it.
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat Feb 6 09:42:17 AEDT 2021
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit f88a7a431212a16e572ecabd559e632f369c363e
Author: Darren Tucker <dtucker at dtucker.net>
Date: Sat Feb 6 09:37:01 2021 +1100
Add a hostname function for systems that don't have it.
Some systems don't have a hostname command (it's not required by POSIX).
The do have uname -n (which is), but as found by tim@ some others (eg
UnixWare) do not report the FQDN from uname -n.
---
regress/test-exec.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index ee47f572..db5d2f9c 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -323,6 +323,15 @@ md5 () {
wc -c
fi
}
+
+# Some platforms don't have hostname at all, but on others uname -n doesn't
+# provide the fully qualified name we need, so in the former case we create
+# our own hostname function.
+if ! have_prog hostname; then
+ hostname() {
+ uname -n
+ }
+fi
# End of portable specific functions
stop_sshd ()
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list