From: Peter van Dijk Date: Fri, 12 Oct 2012 09:47:01 +0000 (+0000) Subject: add --no-config flag to pdns_control, thanks Kees Monshouwer X-Git-Tag: auth-3.2-rc1~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f78b02f35872d5022f736f5c95510a252435a26b;p=thirdparty%2Fpdns.git add --no-config flag to pdns_control, thanks Kees Monshouwer git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2810 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dynloader.cc b/pdns/dynloader.cc index 1eba2dd30c..ed25e2909b 100644 --- a/pdns/dynloader.cc +++ b/pdns/dynloader.cc @@ -60,6 +60,7 @@ int main(int argc, char **argv) ::arg().set("secret","Secret needed to connect to remote PowerDNS"); ::arg().set("config-name","Name of this virtual configuration - will rename the binary image")=""; + ::arg().setCmd("no-config","Don't parse configuration file"); ::arg().set("chroot","")=""; ::arg().setCmd("help","Provide a helpful message"); ::arg().laxParse(argc,argv); @@ -70,26 +71,32 @@ int main(int argc, char **argv) exit(99); } + const vectorcommands=::arg().getCommands(); + + if(commands.empty()) { + cerr<<"No command passed"<&commands=::arg().getCommands(); - - if(commands.empty()) { - cerr<<"No command passed"< D;