Mercurial > masqmail
changeset 160:60c92aa59911
added a script to guess the host's name
author | meillo@marmaro.de |
---|---|
date | Thu, 08 Jul 2010 11:27:03 +0200 |
parents | 27363b36a28c |
children | 6dd3a289989b |
files | contrib/guess-hostname |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/guess-hostname Thu Jul 08 11:27:03 2010 +0200 @@ -0,0 +1,22 @@ +#!/bin/sh +# +# try several ways to guess the hostname + +( + +# this is what Debian uses +cat /etc/mailname + +# this is often the short hostname +cat /etc/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