]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update pdnsutil syntax in error/warning messages.
authorMiod Vallat <miod.vallat@powerdns.com>
Thu, 11 Sep 2025 07:39:43 +0000 (09:39 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 11 Sep 2025 11:08:09 +0000 (13:08 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/dnsrecords.hh
pdns/packethandler.cc
pdns/pdnsutil.cc

index da1c8cb8d7d3e71257346675fd8201bcef213b33..3025b42facfd92db7c7e12e15e7c6af1ed5a7aae 100644 (file)
@@ -1264,7 +1264,7 @@ RNAME##RecordContent::RNAME##RecordContent(const string& zoneData)
     xfrPacket(rtr);                                                                                \
   }                                                                                                \
   catch(RecordTextException& rte) {                                                                \
-    throw MOADNSException("Parsing record content (try 'pdnsutil check-zone'): "+string(rte.what()));  \
+    throw MOADNSException("Parsing record content (try 'pdnsutil zone check'): "+string(rte.what()));  \
   }                                                                                                \
 }                                                                                                  \
                                                                                                    \
index 44463e56360c9308fc7d60fd34920282deefd4f0..dc188eb904745ad1c4de36c1148b994ab18ff61e 100644 (file)
@@ -1984,9 +1984,9 @@ bool PacketHandler::opcodeQueryInner2(DNSPacket& pkt, queryState &state, bool re
     }
     // check whether this could be fixed easily
     // if (*(rrset.back().dr.d_name.rbegin()) == '.') {
-    //      g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): you have a trailing dot, this could be the problem (or run pdnsutil rectify-zone " <<d_sd.qname()<<")"<<endl;
+    //      g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): you have a trailing dot, this could be the problem (or run 'pdnsutil zone rectify " <<d_sd.qname()<<"')"<<endl;
     // } else {
-         g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): please run pdnsutil rectify-zone "<<d_sd.qname()<<endl;
+         g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): please run 'pdnsutil zone rectify "<<d_sd.qname()<<"'"<<endl;
     // }
   }
   else {
index 4723e596d3b853367a3950ebc20dc3a50d17f2c4..d548b2eae7d0cd9b9c29dcd8f1af52745a6951ab 100644 (file)
@@ -1196,7 +1196,7 @@ static int checkZone(DNSSECKeeper &dk, UeberBackend &B, const ZoneName& zone, co
 
     if (isSecure && isOptOut && (rr.qname.hasLabels() && rr.qname.getRawLabel(0) == "*")) {
       cout<<"[Warning] wildcard record '"<<rr.qname<<" IN " <<rr.qtype.toString()<<" "<<rr.content<<"' is insecure"<<endl;
-      cout<<"[Info] Wildcard records in opt-out zones are insecure. Disable the opt-out flag for this zone to avoid this warning. Command: pdnsutil set-nsec3 "<<zone<<endl;
+      cout<<"[Info] Wildcard records in opt-out zones are insecure. Disable the opt-out flag for this zone to avoid this warning. Command: 'pdnsutil zone set-nsec3 "<<zone<<"'"<<endl;
       numwarnings++;
     }
 
@@ -1484,7 +1484,7 @@ static int checkZone(DNSSECKeeper &dk, UeberBackend &B, const ZoneName& zone, co
       numwarnings++;
     }
     if( ! ok && suppliedrecords == nullptr ) {
-      cout << "[Error] Following record is auth=" << rr.auth << ", run pdnsutil rectify-zone?: " << rr.qname << " IN " << rr.qtype.toString() << " " << rr.content << endl;
+      cout << "[Error] Following record is auth=" << rr.auth << ", run 'pdnsutil zone rectify'?: " << rr.qname << " IN " << rr.qtype.toString() << " " << rr.content << endl;
       numerrors++;
     }
   }
@@ -2476,7 +2476,7 @@ static int createZone(const ZoneName &zone, const DNSName& nsname) {
   if (sd.serial == 0) {
     string edit_kind = ::arg()["default-soa-edit"];
     if (!edit_kind.empty() && !pdns_iequals(edit_kind, "NONE")) {
-      cout << "Consider invoking 'pdnsutil increase-serial " << zone << "'" << endl;
+      cout << "Consider invoking 'pdnsutil zone increase-serial " << zone << "'" << endl;
     }
   }
 
@@ -3169,7 +3169,7 @@ static bool showZone(DNSSECKeeper& dnsseckeeper, const ZoneName& zone, bool expo
         cout<<"ID = "<<value.second.id<<" ("<<DNSSECKeeper::keyTypeToString(value.second.keyType)<<")";
       }
       if (value.first.getKey()->getBits() < 1) {
-        cout<<" <key missing or defunct, perhaps you should run pdnsutil hsm create-key>" <<endl;
+        cout<<" <key missing or defunct, perhaps you should run 'pdnsutil hsm create-key'>" <<endl;
         continue;
       }
       if (!exportDS) {
@@ -3242,7 +3242,7 @@ static bool secureZone(DNSSECKeeper& dsk, const ZoneName& zone)
   }
 
   if(dsk.isSecuredZone(zone)) {
-    cerr << "Zone '"<<zone<<"' already secure, remove keys with pdnsutil remove-zone-key if needed"<<endl;
+    cerr << "Zone '"<<zone<<"' already secure, remove keys with 'pdnsutil zone remove-key' if needed"<<endl;
     return false;
   }
 
@@ -3256,7 +3256,7 @@ static bool secureZone(DNSSECKeeper& dsk, const ZoneName& zone)
 
   if (di.kind == DomainInfo::Secondary) {
     cerr << "Warning! This is a secondary zone! If this was a mistake, please run" << endl;
-    cerr<<"pdnsutil disable-dnssec "<<zone<<" right now!"<<endl;
+    cerr<<"'pdnsutil zone dnssec-disable "<<zone<<"' right now!"<<endl;
   }
 
   if (!k_algo.empty()) { // Add a KSK
@@ -4442,7 +4442,7 @@ static int setSignalingZone(vector<string>& cmds, const std::string_view synopsi
 
   DNSSECKeeper dk; //NOLINT(readability-identifier-length)
 
-  // pdnsutil secure-zone $zone
+  // pdnsutil zone secure $zone
   if(!dk.isSecuredZone(zone)) {
     dk.startTransaction(zone);
     bool success = secureZone(dk, zone);
@@ -4452,7 +4452,7 @@ static int setSignalingZone(vector<string>& cmds, const std::string_view synopsi
     }
   }
 
-  // pdnsutil set-nsec3 $zone "1 0 0 -" narrow
+  // pdnsutil zone set-nsec3 $zone "1 0 0 -" narrow
   try {
     if (!dk.setNSEC3PARAM(zone, NSEC3PARAMRecordContent("1 0 0 -"), true)) {
       cerr<<"Cannot set NSEC3 param for " << zone << endl;
@@ -4464,13 +4464,13 @@ static int setSignalingZone(vector<string>& cmds, const std::string_view synopsi
     return 1;
   }
 
-  // pdnsutil rectify-zone $zone
+  // pdnsutil zone rectify $zone
   if(!rectifyZone(dk, zone)) {
     cerr<<"Cannot rectify zone " << zone << endl;
     return 1;
   }
 
-  // pdnsutil set-meta $zone SIGNALING-ZONE 1
+  // pdnsutil metadata set $zone SIGNALING-ZONE 1
   if(addOrSetMeta(zone, "SIGNALING-ZONE", {"1"}, true) != 0) {
     cerr<<"Cannot set meta for zone " << zone << endl;
     return 1;
@@ -5485,7 +5485,7 @@ static int viewAddZone(vector<string>& cmds, const std::string_view synopsis)
     DomainInfo info;
     if (!B.getDomainInfo(zone, info)) {
       cout << "Zone '" << zone << "' does not exist yet."<< endl;
-      cout << "Consider creating it with 'pdnsutil create-zone " << zone << "'" << endl;
+      cout << "Consider creating it with 'pdnsutil zone create " << zone << "'" << endl;
     }
   }
   return 0;