]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Config.pm
* Remove newline from default machine name
[debbugs.git] / Debbugs / Config.pm
index 0db11e6b486e04cefefcb0562ac72165199904b7..15a69e7c6f4c332194c244d8ad85e40db6e01ce6 100644 (file)
@@ -68,6 +68,7 @@ BEGIN {
                                 qw(@gPostProcessall @gRemovalDefaultDistributionTags @gRemovalDistributionTags @gRemovalArchitectures),
                                 qw(@gRemovalStrongSeverityDefaultDistributionTags),
                                 qw(@gDefaultArchitectures),
+                                qw($gMachineName),
                                 qw($gTemplateDir),
                                 qw($gDefaultPackage),
                                 qw($gSpamMaxThreads $gSpamSpamsPerThread $gSpamKeepRunning $gSpamScan $gSpamCrossassassinDb),
@@ -276,6 +277,24 @@ Default: $config{maintainer_email}
 
 set_default(\%config,'unknown_maintainer_email',$config{maintainer_email});
 
+=item machine_name
+
+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)
+
+=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;
+
 =head2 BTS Mailing Lists