]> granicus.if.org Git - pdns/commitdiff
implement & document rec_control version, closes #1706
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 9 Sep 2014 17:27:34 +0000 (19:27 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 9 Sep 2014 17:27:34 +0000 (19:27 +0200)
pdns/docs/pdns.xml
pdns/docs/rec_control.1.txt
pdns/rec_channel_rec.cc

index 5973330f689e211a21dc8d5925635e329eef096c..9374b009e3548d695c93db2a830e039bd2928644 100644 (file)
@@ -15922,6 +15922,15 @@ sql> insert into domainmetadata (domain_id, kind, content) values (6, 'TSIG-ALLO
                </para>
              </listitem>
            </varlistentry>       
+           <varlistentry>
+             <term>version</term>
+             <listitem>
+               <para>
+                 Available after 3.6.1, report currently running version
+               </para>
+             </listitem>
+           </varlistentry>       
+
            <varlistentry>
              <term>wipe-cache domain0. [domain1. domain2.]</term>
              <listitem>
index 9e49da79e29de66fabf4d4a2289ca5ea60e8a2da..1c3b3d1de2e07de7ceaa43a86141609a33118547 100644 (file)
@@ -102,16 +102,19 @@ reload-zones::
 set-minimum-ttl <value>::
        Set minimum-ttl-override.
 
-trace-regex [regex]::
-       Emit resolution trace for matching queries. Empty regex to disable trace.
-
 top-remotes::
        Shows the top-20 most active remote hosts. Statistics are over the
        last 'remotes-ringbuffer-entries' queries, which defaults to 0.
 
+trace-regex [regex]::
+       Emit resolution trace for matching queries. Empty regex to disable trace.
+
 unload-lua-script::
        Unloads Lua script.
 
+version::
+       Report running version (available after 3.6.1)
+
 wipe-cache <domain0> [domain1]::
        Wipe entries from the cache. This is useful if, for example, an
        important server has a new IP address, but the TTL has not yet
index b3ec8826ee072330a221762fe0a24125b0e234c5..df72fb96da7ce45f31150837eeb56befdb205c9e 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/time.h>
 #include "lock.hh"
 #include "responsestats.hh"
+#include "version_generated.h"
 
 #include "namespaces.hh"
 pthread_mutex_t g_carbon_config_lock=PTHREAD_MUTEX_INITIALIZER;
@@ -664,6 +665,7 @@ string RecursorControlParser::getAnswer(const string& question, RecursorControlP
 "trace-regex [regex]              emit resolution trace for matching queries (empty regex to clear trace)\n"
 "top-remotes                      show top remotes\n"
 "unload-lua-script                unload Lua script\n"
+"version                          return Recursor version number\n"
 "wipe-cache domain0 [domain1] ..  wipe domain data from cache\n";
 
   if(cmd=="get-all")
@@ -679,6 +681,10 @@ string RecursorControlParser::getAnswer(const string& question, RecursorControlP
     *command=&doExit;
     return "bye\n";
   }
+
+  if(cmd=="version") {
+    return string(PDNS_VERSION)+"\n";
+  }
   
   if(cmd=="quit-nicely") {
     *command=&doExitNicely;