Use uname -n as default for the HOSTNAME configuration variable.

This commit is contained in:
Dag-Erling Smørgrav 2004-02-01 04:51:25 +00:00
parent e7f004fe23
commit 154671e516
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125291
2 changed files with 7 additions and 4 deletions

View file

@ -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.

View file

@ -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";