# HG changeset patch # User meillo@marmaro.de # Date 1278584351 -7200 # Node ID 71dcdc2020bc02df722a0bceb3df33468c103274 # Parent 6dd3a289989bbf007a55c77208f5b20e99a5e97d guess-hostname: ordered guesses by quality diff -r 6dd3a289989b -r 71dcdc2020bc contrib/guess-hostname --- a/contrib/guess-hostname Thu Jul 08 11:53:07 2010 +0200 +++ b/contrib/guess-hostname Thu Jul 08 12:19:11 2010 +0200 @@ -1,22 +1,23 @@ #!/bin/sh # # try several ways to guess the hostname +# earlier output lines are probably better ( # this is what Debian uses cat /etc/mailname +# probably a good value on GNU/Linux +hostname -f + # this is often the short hostname cat /etc/hostname +# often the short hostname, but widely available +hostname + # this file was mentioned on the Internet cat /etc/HOSTNAME -# probably a good value on GNU/Linux -hostname -f - -# often the short hostname, but widely available -hostname - -) 2>/dev/null | sort -u +) 2>/dev/null