Mercurial > masqmail
diff contrib/guess-hostname @ 162:71dcdc2020bc
guess-hostname: ordered guesses by quality
author | meillo@marmaro.de |
---|---|
date | Thu, 08 Jul 2010 12:19:11 +0200 |
parents | 60c92aa59911 |
children | 92b58989a09e |
line wrap: on
line diff
--- 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