diff options
author | HÃ¥vard Pettersen <havardpe@gmail.com> | 2018-05-14 18:01:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 18:01:16 +0200 |
commit | ec1be40f3163ad22f89d76e03959086367846913 (patch) | |
tree | cbf0ebc678420ca38969e4d4da388537c0e97a52 | |
parent | a9d9ef3dc96791185de550702876d49b1fef9557 (diff) | |
parent | 60d6e097ac11772952fe83e3d888ec8fe9ec056d (diff) |
Merge pull request #5864 from vespa-engine/arnej/fix-perl-syntax
update perl bootstrap
-rwxr-xr-x | config-model/src/main/perl/vespa-deploy | 2 | ||||
-rwxr-xr-x | config/src/apps/vespa-config/vespa-config.pl | 2 | ||||
-rwxr-xr-x | configgen/bin/make-config.pl | 2 | ||||
-rwxr-xr-x | configgen/bin/make-configold.pl | 2 | ||||
-rwxr-xr-x | vespaclient/src/perl/bin/GetClusterState.pl | 2 | ||||
-rwxr-xr-x | vespaclient/src/perl/bin/GetNodeState.pl | 2 | ||||
-rwxr-xr-x | vespaclient/src/perl/bin/SetNodeState.pl | 2 |
7 files changed, 14 insertions, 0 deletions
diff --git a/config-model/src/main/perl/vespa-deploy b/config-model/src/main/perl/vespa-deploy index f13846332c6..e61f3893749 100755 --- a/config-model/src/main/perl/vespa-deploy +++ b/config-model/src/main/perl/vespa-deploy @@ -59,9 +59,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 { diff --git a/config/src/apps/vespa-config/vespa-config.pl b/config/src/apps/vespa-config/vespa-config.pl index d43016331f4..d651dc2ce39 100755 --- a/config/src/apps/vespa-config/vespa-config.pl +++ b/config/src/apps/vespa-config/vespa-config.pl @@ -59,9 +59,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 { diff --git a/configgen/bin/make-config.pl b/configgen/bin/make-config.pl index 0e116f5eb45..7b1f1f833ab 100755 --- a/configgen/bin/make-config.pl +++ b/configgen/bin/make-config.pl @@ -66,9 +66,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 { diff --git a/configgen/bin/make-configold.pl b/configgen/bin/make-configold.pl index dcba0a02a6d..bbf7322a059 100755 --- a/configgen/bin/make-configold.pl +++ b/configgen/bin/make-configold.pl @@ -66,9 +66,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 { diff --git a/vespaclient/src/perl/bin/GetClusterState.pl b/vespaclient/src/perl/bin/GetClusterState.pl index e3528fff039..155db87f34e 100755 --- a/vespaclient/src/perl/bin/GetClusterState.pl +++ b/vespaclient/src/perl/bin/GetClusterState.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 { diff --git a/vespaclient/src/perl/bin/GetNodeState.pl b/vespaclient/src/perl/bin/GetNodeState.pl index 28f3cf99b1f..1e048df4b40 100755 --- a/vespaclient/src/perl/bin/GetNodeState.pl +++ b/vespaclient/src/perl/bin/GetNodeState.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 { 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 { |