]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add --version to zone2ldap
authorPieter Lexis <pieter.lexis@powerdns.com>
Sat, 30 Apr 2016 11:32:53 +0000 (13:32 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Sat, 30 Apr 2016 11:32:53 +0000 (13:32 +0200)
pdns/zone2ldap.cc

index bf8dccdbe334d611a84eb08e7345b22a8c42860f..061a406979182d644e18fdce8f4370b941f20c45 100644 (file)
@@ -152,6 +152,7 @@ int main( int argc, char* argv[] )
 #endif
                 reportAllTypes();
                 args.setCmd( "help", "Provide a helpful message" );
+                args.setCmd( "version", "Print the version" );
                 args.setSwitch( "verbose", "Verbose comments on operation" ) = "no";
                 args.setSwitch( "resume", "Continue after errors" ) = "no";
                 args.setSwitch( "dnsttl", "Add dnsttl attribute to every entry" ) = "no";
@@ -163,6 +164,11 @@ int main( int argc, char* argv[] )
 
                 args.parse( argc, argv );
 
+                if(args.mustDo("version")) {
+                  cerr<<"zone2ldap "<<VERSION<<endl;
+                  exit(0);
+                }
+
                 if( args.mustDo( "help" ) )
                 {
                         cout << "Syntax:" << endl << endl;