Mercurial > masqmail
annotate contrib/guess-hostname @ 216:84bf7a6b6ccd
added misc/list-versions
This script helps to check if the versions numbers in the project
are the same as the one for the release. This script is motivated
by the 0.2.27 release in which masqmail introduces itself as being
version 0.2.26.
author | meillo@marmaro.de |
---|---|
date | Mon, 19 Jul 2010 14:01:13 +0200 |
parents | 71dcdc2020bc |
children | 92b58989a09e |
rev | line source |
---|---|
160 | 1 #!/bin/sh |
2 # | |
3 # try several ways to guess the hostname | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
4 # earlier output lines are probably better |
160 | 5 |
6 ( | |
7 | |
8 # this is what Debian uses | |
9 cat /etc/mailname | |
10 | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
11 # probably a good value on GNU/Linux |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
12 hostname -f |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
13 |
160 | 14 # this is often the short hostname |
15 cat /etc/hostname | |
16 | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
17 # often the short hostname, but widely available |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
18 hostname |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
19 |
160 | 20 # this file was mentioned on the Internet |
21 cat /etc/HOSTNAME | |
22 | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
23 ) 2>/dev/null |