aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-05-18 08:59:22 +0000
committerArne Juul <arnej@yahoo-inc.com>2018-05-18 12:08:59 +0000
commit6ad2c1b0f14972aa6df8082e96385b032be182f4 (patch)
tree959c0e4ac40a6ff46cc03604a1a3aea703d9f5d3 /config
parentb857943bb81747a24c8b9461e7337ddba614b698 (diff)
move perl complexity to simpler shell function
Diffstat (limited to 'config')
-rwxr-xr-xconfig/src/apps/vespa-config/vespa-config.pl24
1 files changed, 1 insertions, 23 deletions
diff --git a/config/src/apps/vespa-config/vespa-config.pl b/config/src/apps/vespa-config/vespa-config.pl
index 7f631187b58..6c0eb241959 100755
--- a/config/src/apps/vespa-config/vespa-config.pl
+++ b/config/src/apps/vespa-config/vespa-config.pl
@@ -266,24 +266,6 @@ sub printConfigHttpSources {
print $out . "\n";
}
-sub isThisAConfigServer {
- my $addr;
- foreach $addr (getConfigServers()) {
- my $host = "";
- my $port = 0;
- if ($addr =~ /(.*):(\d+)$/) {
- $host = $1;
- }
- if ($myHostname eq $host or $host eq "localhost") {
- print "yes\n";
- exit 0;
- }
- }
-
- print "no\n";
- exit 1;
-}
-
# Perl trim function to remove whitespace from the start and end of the string
sub trim($) {
my $string = shift;
@@ -299,7 +281,7 @@ sub getLastLine {
sub usage {
print "usage: ";
- print "vespa-config [-configsources | -confighttpsources | -zkstring | -configserverport | -zkclientport | -isthisaconfigserver]\n";
+ print "vespa-config [-configsources | -confighttpsources | -zkstring | -configserverport | -zkclientport]\n";
}
if ( @ARGV == 0 ) {
@@ -334,10 +316,6 @@ if ( $ARGV[0] eq "-zkclientport" ) {
print "$zk_client_port\n";
exit 0;
}
-if ( $ARGV[0] eq "-isthisaconfigserver" ) {
- isThisAConfigServer();
- exit 0;
-}
usage();
exit 1;