From: bert hubert Date: Mon, 15 Feb 2016 20:06:12 +0000 (+0100) Subject: add clear-zone which clears all records but keeps the zone around X-Git-Tag: dnsdist-1.0.0-beta1~109^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed2ecbe3ffbe9172f25a07bcac29dd9332326cf;p=thirdparty%2Fpdns.git add clear-zone which clears all records but keeps the zone around --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 9e59fd4ec3..eadfad741e 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -865,6 +865,21 @@ int read1char(){ return c; } +int clearZone(DNSSECKeeper& dk, const DNSName &zone) { + UeberBackend B; + DomainInfo di; + + if (! B.getDomainInfo(zone, di)) { + cerr<<"Domain '"<startTransaction(zone, di.id)) { + cerr<<"Unable to start transaction for load of zone '"<commitTransaction(); + return 0; +} int editZone(DNSSECKeeper& dk, const DNSName &zone) { UeberBackend B; @@ -1831,6 +1846,7 @@ try cerr<<"check-zone ZONE Check a zone for correctness"< 2) { cerr<<"Syntax: pdnsutil list-keys [ZONE]"<