From: Francis Dupont Date: Sat, 20 Jun 2015 13:45:47 +0000 (+0200) Subject: [3882a] Extended -V and added -W X-Git-Tag: trac3908_base~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6727e5b1dd02595634a7116d222f6832fbf8fa0;p=thirdparty%2Fkea.git [3882a] Extended -V and added -W --- diff --git a/src/bin/lfc/kea-lfc.xml b/src/bin/lfc/kea-lfc.xml index e8bd970860..b9a11f316e 100644 --- a/src/bin/lfc/kea-lfc.xml +++ b/src/bin/lfc/kea-lfc.xml @@ -20,7 +20,7 @@ - Feb 1, 2015 + June 20, 2015 @@ -53,6 +53,7 @@ + @@ -99,6 +100,13 @@ + + + + Display the configuration report. + + + diff --git a/src/bin/lfc/lfc_controller.cc b/src/bin/lfc/lfc_controller.cc index 49a260975a..84eb55103d 100644 --- a/src/bin/lfc/lfc_controller.cc +++ b/src/bin/lfc/lfc_controller.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -157,7 +158,7 @@ LFCController::parseArgs(int argc, char* argv[]) { opterr = 0; optind = 1; - while ((ch = getopt(argc, argv, ":46dvVp:x:i:o:c:f:")) != -1) { + while ((ch = getopt(argc, argv, ":46dvVWp:x:i:o:c:f:")) != -1) { switch (ch) { case '4': // Process DHCPv4 lease files. @@ -179,6 +180,11 @@ LFCController::parseArgs(int argc, char* argv[]) { std::cout << getVersion(true) << std::endl; exit(EXIT_SUCCESS); + case 'W': + // Display the configuration report and exit. + std::cout << isc::detail::getConfigReport() << std::endl; + exit(EXIT_SUCCESS); + case 'd': // Verbose output. verbose_ = true; @@ -325,7 +331,8 @@ LFCController::getVersion(const bool extended) const{ version_stream << VERSION; if (extended) { - version_stream << std::endl << EXTENDED_VERSION; + version_stream << std::endl << EXTENDED_VERSION << std::endl + << "database: " << isc::dhcp::Memfile_LeaseMgr::getDBVersion(); } return (version_stream.str());