]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil: warn if we can't read the config file 3345/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 8 Feb 2016 11:13:19 +0000 (12:13 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 8 Feb 2016 14:26:18 +0000 (15:26 +0100)
Closes #3305

pdns/pdnsutil.cc

index 7a2e25ca79f9e252b54de8f3cdf9b11d3d428845..f822de8c572846e331686ab54eae7457fa6fb2c3 100644 (file)
@@ -99,7 +99,9 @@ void loadMainConfig(const std::string& configdir)
   L.toConsole(Logger::Error);   // so we print any errors
   BackendMakers().launch(::arg()["launch"]); // vrooooom!
   L.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));  
-  ::arg().laxFile(configname.c_str());    
+
+  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");