aboutsummaryrefslogtreecommitdiffstats
path: root/configutil/src/apps/configstatus/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'configutil/src/apps/configstatus/main.cpp')
-rw-r--r--configutil/src/apps/configstatus/main.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/configutil/src/apps/configstatus/main.cpp b/configutil/src/apps/configstatus/main.cpp
index b3fb611ffa4..6cc1b8f1240 100644
--- a/configutil/src/apps/configstatus/main.cpp
+++ b/configutil/src/apps/configstatus/main.cpp
@@ -79,21 +79,12 @@ Application::Main(void)
vespalib::string
Application::getSources(void)
{
- vespalib::string cmd = vespa::Defaults::vespaHome();
- cmd.append("libexec/vespa/vespa-config.pl -configsources");
- FILE* fp = popen(cmd.c_str(), "r");
- if (fp == 0) {
- std::cerr << "Failed to run " << cmd << " ("
- << errno << "): " << strerror(errno) << "\n";
- return "";
+ vespalib::string specs;
+ for (std::string v : vespa::Defaults::vespaConfigSourcesRpcAddrs()) {
+ if (! specs.empty()) specs += ",";
+ specs += v;
}
- vespalib::asciistream specs;
- char data[500];
- while (fgets(data, 500, fp) != 0) {
- specs << &data[0] << "\n";
- }
- pclose(fp);
- return specs.str();
+ return specs;
}
int