summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tbmaster.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/tools/tinderbox/tbmaster.pl b/tools/tools/tinderbox/tbmaster.pl
index 45e4e60..b9ea181 100644
--- a/tools/tools/tinderbox/tbmaster.pl
+++ b/tools/tools/tinderbox/tbmaster.pl
@@ -355,6 +355,11 @@ MAIN:{
chomp($config);
$config =~ s/^(\w+)(\..*)?/$1/;
$CONFIG{'HOSTNAME'} = `/usr/bin/uname -n`;
+ if ($CONFIG{'HOSTNAME'} =~ m/^([0-9a-z-]+(?:\.[0-9a-z-]+)*)$/) {
+ $CONFIG{'HOSTNAME'} = $1;
+ } else {
+ $CONFIG{'HOSTNAME'} = 'unknown';
+ }
if ($ENV{'HOME'} =~ m/^((?:\/[\w\.-]+)+)\/*$/) {
$CONFIG{'HOME'} = $1;
$etcdir = "$1/etc";
OpenPOWER on IntegriCloud