]> granicus.if.org Git - pdns/commitdiff
pdnsutil: respect default-soa-* settings
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 15 Feb 2016 20:05:06 +0000 (21:05 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 15 Feb 2016 20:05:06 +0000 (21:05 +0100)
Closes #3382

pdns/pdnsutil.cc

index 6234916fba505ebc5b2fc76d0b576b3412ffbd1d..9e59fd4ec35a1fc1e0e399bf69829e9726ab862a 100644 (file)
@@ -97,8 +97,6 @@ void loadMainConfig(const std::string& configdir)
   BackendMakers().launch(::arg()["launch"]); // vrooooom!
   L.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));  
 
-  if (! ::arg().laxFile(configname.c_str()))
-    cerr<<"Warning: unable to read configuration file '"<<configname<<"'."<<endl;
   //cerr<<"Backend: "<<::arg()["launch"]<<", '" << ::arg()["gmysql-dbname"] <<"'" <<endl;
 
   S.declare("qsize-q","Number of questions waiting for database attention");
@@ -121,6 +119,10 @@ void loadMainConfig(const std::string& configdir)
   ::arg().set("soa-expire-default","Default SOA expire")="604800";
   ::arg().set("soa-minimum-ttl","Default SOA minimum ttl")="3600";    
 
+  // Keep this line below all ::arg().set() statements
+  if (! ::arg().laxFile(configname.c_str()))
+    cerr<<"Warning: unable to read configuration file '"<<configname<<"'."<<endl;
+
   UeberBackend::go();
 }