summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-02-01 04:51:25 +0000
committerdes <des@FreeBSD.org>2004-02-01 04:51:25 +0000
commit6b653d4085f2f05070dfb82376f97b539019c66d (patch)
treea97d8ee1550ac4c115f3bb814174ac8b266106ef /tools
parentadc4a3ea82ac1a67aeaa4d2ae9ece8028e1a9a3b (diff)
downloadFreeBSD-src-6b653d4085f2f05070dfb82376f97b539019c66d.zip
FreeBSD-src-6b653d4085f2f05070dfb82376f97b539019c66d.tar.gz
Use `uname -n` as default for the HOSTNAME configuration variable.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tbmaster.17
-rw-r--r--tools/tools/tinderbox/tbmaster.pl4
2 files changed, 7 insertions, 4 deletions
diff --git a/tools/tools/tinderbox/tbmaster.1 b/tools/tools/tinderbox/tbmaster.1
index 1dbcb09..1ffc6b8 100644
--- a/tools/tools/tinderbox/tbmaster.1
+++ b/tools/tools/tinderbox/tbmaster.1
@@ -139,8 +139,11 @@ Read-only.
.It HOSTNAME
.Pq Vt single
The name of the host running the tinderbox.
-This is used for cosmetic purposes only.
-No default value.
+This defaults to the name reported by the
+.Fl n
+option of the
+.Xr uname 1
+command, and is only used for cosmetic purposes.
.It LOGDIR
.Pq Vt single
The location of the log directory.
diff --git a/tools/tools/tinderbox/tbmaster.pl b/tools/tools/tinderbox/tbmaster.pl
index c96b483..45e4e60 100644
--- a/tools/tools/tinderbox/tbmaster.pl
+++ b/tools/tools/tinderbox/tbmaster.pl
@@ -224,8 +224,7 @@ sub tinderbox($$$) {
# Fork and start the tinderbox
my @args = @{$CONFIG{'OPTIONS'}};
- push(@args, "--hostname=" . expand('HOSTNAME'))
- if ($CONFIG{'HOSTNAME'});
+ push(@args, "--hostname=" . expand('HOSTNAME'));
push(@args, "--sandbox=" . expand('SANDBOX'));
push(@args, "--arch=$arch");
push(@args, "--machine=$machine");
@@ -355,6 +354,7 @@ MAIN:{
$config = `uname -n`;
chomp($config);
$config =~ s/^(\w+)(\..*)?/$1/;
+ $CONFIG{'HOSTNAME'} = `/usr/bin/uname -n`;
if ($ENV{'HOME'} =~ m/^((?:\/[\w\.-]+)+)\/*$/) {
$CONFIG{'HOME'} = $1;
$etcdir = "$1/etc";
OpenPOWER on IntegriCloud