]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge UNIX_declareArguments into declareArguments 6694/head
authorChris Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Tue, 29 May 2018 22:13:23 +0000 (00:13 +0200)
committerChris Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Tue, 29 May 2018 22:13:23 +0000 (00:13 +0200)
pdns/common_startup.cc
pdns/receiver.cc

index e591174c84d40617e746839d50e70ccd9b84fc10..786a212a72a5e11a8b881c3f624847d95259a94d 100644 (file)
@@ -62,6 +62,14 @@ ArgvMap &arg()
 
 void declareArguments()
 {
+  ::arg().set("config-dir","Location of configuration directory (pdns.conf)")=SYSCONFDIR;
+  ::arg().set("config-name","Name of this virtual configuration - will rename the binary image")="";
+  ::arg().set("socket-dir",string("Where the controlsocket will live, ")+LOCALSTATEDIR+" when unset and not chrooted" )="";
+  ::arg().set("module-dir","Default directory for modules")=PKGLIBDIR;
+  ::arg().set("chroot","If set, chroot to this directory for more security")="";
+  ::arg().set("logging-facility","Log under a specific facility")="";
+  ::arg().set("daemon","Operate as a daemon")="no";
+
   ::arg().set("local-port","The port on which we listen")="53";
   ::arg().setSwitch("dnsupdate","Enable/Disable DNS update (RFC2136) support. Default is no.")="no";
   ::arg().setSwitch("write-pid","Write a PID file")="yes";
index d62e0f1df693d23331e16a0412a691d08585865c..9b4749c6c01aaa50701a0370b05f8d007f6c6398 100644 (file)
@@ -350,17 +350,6 @@ static int guardian(int argc, char **argv)
   }
 }
 
-static void UNIX_declareArguments()
-{
-  ::arg().set("config-dir","Location of configuration directory (pdns.conf)")=SYSCONFDIR;
-  ::arg().set("config-name","Name of this virtual configuration - will rename the binary image")="";
-  ::arg().set("socket-dir",string("Where the controlsocket will live, ")+LOCALSTATEDIR+" when unset and not chrooted" )="";
-  ::arg().set("module-dir","Default directory for modules")=PKGLIBDIR;
-  ::arg().set("chroot","If set, chroot to this directory for more security")="";
-  ::arg().set("logging-facility","Log under a specific facility")="";
-  ::arg().set("daemon","Operate as a daemon")="no";
-}
-
 #ifdef __GLIBC__
 #include <execinfo.h>
 static void tbhandler(int num)
@@ -405,7 +394,6 @@ int main(int argc, char **argv)
   g_log.toConsole(Logger::Warning);
   try {
     declareArguments();
-    UNIX_declareArguments();
 
     ::arg().laxParse(argc,argv); // do a lax parse