Don't pass --fqdn to hostname if it fails
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@855 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
2f349d7cba
commit
ce5b41df9f
@ -5,6 +5,10 @@ use Getopt::Long;
|
|||||||
|
|
||||||
my %opts = ();
|
my %opts = ();
|
||||||
chomp (my $hostname = `hostname --fqdn`);
|
chomp (my $hostname = `hostname --fqdn`);
|
||||||
|
if ($?) {
|
||||||
|
chomp($hostname = `hostname`);
|
||||||
|
}
|
||||||
|
print "Using hostname: $hostname\n";
|
||||||
my %defaults = (
|
my %defaults = (
|
||||||
C => 'XY',
|
C => 'XY',
|
||||||
ST => 'unknown',
|
ST => 'unknown',
|
||||||
|
Loading…
Reference in New Issue
Block a user