aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient/src/perl/bin/SetNodeState.pl
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient/src/perl/bin/SetNodeState.pl')
-rwxr-xr-xvespaclient/src/perl/bin/SetNodeState.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/vespaclient/src/perl/bin/SetNodeState.pl b/vespaclient/src/perl/bin/SetNodeState.pl
index 91ceeea2c1b..77ebf9a2456 100755
--- a/vespaclient/src/perl/bin/SetNodeState.pl
+++ b/vespaclient/src/perl/bin/SetNodeState.pl
@@ -57,9 +57,11 @@ sub findhost {
my $tmp = $ENV{'VESPA_HOSTNAME'};
if (!defined $tmp) {
$tmp = `vespa-detect-hostname` or die "Could not detect hostname\n";
+ chomp $tmp;
}
system("vespa-validate-hostname $tmp");
( $? == 0 ) or die "Could not validate hostname\n";
+ return $tmp;
}
BEGIN {