mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-18 16:14:34 +00:00
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.
This commit is contained in:
parent
5e385a71ef
commit
f88a7a4312
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user