di.backend->commitTransaction();
- // Zone is not secured yet, suggest applying default-soa-edit rule to the
- // serial number, if applicable.
- if (sd.serial == 0) {
- string edit_kind = ::arg()["default-soa-edit"];
- if (!edit_kind.empty() && !pdns_iequals(edit_kind, "NONE")) {
- cout << "Consider invoking 'pdnsutil zone increase-serial " << zone << "'" << endl;
+ if (!g_quiet) {
+ // Zone is not secured yet, suggest applying default-soa-edit rule to the
+ // serial number, if applicable.
+ if (sd.serial == 0) {
+ string edit_kind = ::arg()["default-soa-edit"];
+ if (!edit_kind.empty() && !pdns_iequals(edit_kind, "NONE")) {
+ cout << "Consider invoking 'pdnsutil zone increase-serial " << zone << "'" << endl;
+ }
}
- }
- if (::arg().asNum("zone-cache-refresh-interval") != 0) {
- cout << "If the authoritative server is running, be sure to refresh its zone cache" << endl << "with 'pdns_control rediscover'" << endl;
+ if (::arg().asNum("zone-cache-refresh-interval") != 0) {
+ cout << "If the authoritative server is running, be sure to refresh its zone cache" << endl << "with 'pdns_control rediscover'" << endl;
+ }
}
return EXIT_SUCCESS;
echo ANALYZE\; | sqlite3 pdns.sqlite3
# Create zone
-$PDNSUTIL $ARGS zone create bug.less
+$PDNSUTIL -q $ARGS zone create bug.less
# Add some valid records
$PDNSUTIL $ARGS rrset add bug.less bug.less NS no.bug.less
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
New rrset:
bug.less. 3600 IN NS no.bug.less.
New rrset:
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
sequential generator generated 1 2 3 correctly
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
random generator generated something other than 1 2 3, good
echo === random=$random
echo == creating zone
- $PDNSUTIL --config-dir="${workdir}" --config-name=lmdb create-zone example.com
+ $PDNSUTIL --config-dir="${workdir}" --config-name=lmdb -q create-zone example.com
$PDNSUTIL --config-dir="${workdir}" --config-name=lmdb set-meta example.com FOO BAR
$PDNSUTIL --config-dir="${workdir}" --config-name=lmdb show-zone example.com | grep FOO
echo == deleting zone
$PDNSUTIL --config-dir="${workdir}" --config-name=lmdb delete-zone example.com
mdb_dump -p -a -n ${workdir}/pdns.lmdb | egrep -o 'FOO[0-9]*' | LC_ALL=C sort
-done
\ No newline at end of file
+done
=== random=no
== creating zone
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
-WARNING: local files have been created as a result of this operation.
-Be sure to check the files owner, group and permission to make sure that
-the authoritative server can correctly use them.
Set 'example.com' meta FOO = BAR
FOO BAR
FOO
== deleting zone
=== random=yes
== creating zone
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
-WARNING: local files have been created as a result of this operation.
-Be sure to check the files owner, group and permission to make sure that
-the authoritative server can correctly use them.
Set 'example.com' meta FOO = BAR
FOO BAR
FOO
set -e # to make this first call exit us early for non-variant capable backends. This relies on the existing example.com causing "already exists"
-pdnsutil_wrapper create-zone example.com..variant1 | egrep -v 'file|use them'
+pdnsutil_wrapper -q create-zone example.com..variant1
set +e
pdnsutil_wrapper show-zone example.com..variant1
-pdnsutil_wrapper create-zone ..myroot | egrep -v 'file|use them'
+pdnsutil_wrapper -q create-zone ..myroot
pdnsutil_wrapper show-zone ..myroot
-pdnsutil_wrapper create-zone . | egrep -v 'file|use them'
+pdnsutil_wrapper -q create-zone .
pdnsutil_wrapper show-zone .
pdnsutil_wrapper list-all-zones | LC_ALL=C sort
Creating empty zone 'example.com..variant1'
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
This is a Native zone
Variant: variant1
Zone is not actively secured
SOA-EDIT-API DEFAULT
No keys for zone 'example.com..variant1'.
Creating empty zone '..myroot'
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
This is a Native zone
Variant: myroot
Zone is not actively secured
SOA-EDIT-API DEFAULT
No keys for zone '..myroot'.
Creating empty zone '.'
-If the authoritative server is running, be sure to refresh its zone cache
-with 'pdns_control rediscover'
This is a Native zone
Zone is not actively secured
Metadata items: