#!/bin/sh
# Paul Wouters <pwouters@redhat.com>
# This folds back zone updates, dynamic updates, etc that nsd records
# in the nsd.db file back into the zone files
# Only check when nsd is actively running
# sysvinit: (service nsd status has useless return codes)
pidof nsd > /dev/null || exit 0
# Default settings - do not edit these but /etc/sysconfig/nsd instead!
NSD_CONF="/etc/nsd/nsd.conf"
NSDC_PROG="/usr/sbin/nsd-control"
NSD_CHECKCONF_PROG="/usr/sbin/nsd-checkconf"
# Read in local settings.
[ -r /etc/sysconfig/nsd ] && . /etc/sysconfig/nsd
# needed to avoid useless AVC rhbz#989218
cd ~nsd
${NSDC_PROG} -c ${NSD_CONF} write > /dev/null 2>&1