Skip to content

Avoid errors on zone delete

When I delete a DNS zone I often get warnings mailed.

This is because named-checkzone is ran for every rr being deleted, and in the end the NS records are missing.

WARNING - Reason for Bind restart failure: zone example.com/IN: has no NS records
zone example.com/IN: not loaded due to errors.

The message itself is also a copy/paste bug, at that point it's not yet restarting bind. It's named-checkzone.

I'd like to pass on a flag from dns_soa_del.php to indicate that we're deleting a whole soa.

Let me know if this method is suitable, or if you see a better way.