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:
Matt Sergeant 2008-03-13 19:51:00 +00:00
parent 2f349d7cba
commit ce5b41df9f

View File

@ -5,6 +5,10 @@ use Getopt::Long;
my %opts = ();
chomp (my $hostname = `hostname --fqdn`);
if ($?) {
chomp($hostname = `hostname`);
}
print "Using hostname: $hostname\n";
my %defaults = (
C => 'XY',
ST => 'unknown',