]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3882a] Extended -V and added -W
authorFrancis Dupont <fdupont@isc.org>
Sat, 20 Jun 2015 13:45:47 +0000 (15:45 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sat, 20 Jun 2015 13:45:47 +0000 (15:45 +0200)
src/bin/lfc/kea-lfc.xml
src/bin/lfc/lfc_controller.cc

index e8bd9708604249a0c2255edbf6e7dee3d3b08880..b9a11f316efff97d2204ba4cf8d95f3b55875f26 100644 (file)
@@ -20,7 +20,7 @@
 <refentry>
 
   <refentryinfo>
-    <date>Feb 1, 2015</date>
+    <date>June 20, 2015</date>
   </refentryinfo>
 
   <refmeta>
@@ -53,6 +53,7 @@
       <arg><option>-f <replaceable class="parameter">finish-file</replaceable></option></arg>
       <arg><option>-v</option></arg>
       <arg><option>-V</option></arg>
+      <arg><option>-W</option></arg>
       <arg><option>-d</option></arg>
       <arg><option>-h</option></arg>
     </cmdsynopsis>
         </para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>-W</option></term>
+        <listitem><para>
+          Display the configuration report.
+        </para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>-h</option></term>
         <listitem><para>
index 49a260975a2f91429e2b2b0132945cfd4df3cc17..84eb55103dbbcbb6e353ce40a65aff55c9dab02b 100644 (file)
@@ -20,6 +20,7 @@
 #include <exceptions/exceptions.h>
 #include <dhcpsrv/csv_lease_file4.h>
 #include <dhcpsrv/csv_lease_file6.h>
+#include <dhcpsrv/memfile_lease_mgr.h>
 #include <dhcpsrv/memfile_lease_storage.h>
 #include <dhcpsrv/lease_mgr.h>
 #include <dhcpsrv/lease_file_loader.h>
@@ -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());