]> git.donarmstrong.com Git - debbugs.git/commitdiff
use Sys::Hostname::hostname instead of hostname --fqdn
authorDon Armstrong <don@donarmstrong.com>
Mon, 25 May 2015 17:17:12 +0000 (10:17 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 25 May 2015 17:17:12 +0000 (10:17 -0700)
Debbugs/Config.pm

index 4cc7e9d2895510b91100aeedd2e8f11805e9fbcb..f70860452e042af31667570c5ccb3aa418044314 100644 (file)
@@ -87,6 +87,7 @@ BEGIN {
      $ENV{HOME} = '' if not defined $ENV{HOME};
 }
 
      $ENV{HOME} = '' if not defined $ENV{HOME};
 }
 
+use Sys::Hostname;
 use File::Basename qw(dirname);
 use IO::File;
 use Safe;
 use File::Basename qw(dirname);
 use IO::File;
 use Safe;
@@ -298,18 +299,13 @@ set_default(\%config,'unknown_maintainer_email',$config{maintainer_email});
 The name of the machine that this instance of debbugs is running on
 (currently used for debbuging purposes and web page output.)
 
 The name of the machine that this instance of debbugs is running on
 (currently used for debbuging purposes and web page output.)
 
-Default: qx(hostname --fqdn)
+Default: Sys::Hostname::hostname()
 
 =back
 
 =cut
 
 
 =back
 
 =cut
 
-my $_old_path = $ENV{PATH};
-$ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';
-my $temp_hostname = qx(hostname --fqdn);
-chomp $temp_hostname;
-set_default(\%config,'machine_name',$temp_hostname);
-$ENV{PATH} = $_old_path;
+set_default(\%config,'machine_name',Sys::Hostname::hostname());
 
 =head2 BTS Mailing Lists
 
 
 =head2 BTS Mailing Lists