isc-dhcp: avoid gratuitous reload of named
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
parent
e27b2655c8
commit
77d9ed5f6e
1 changed files with 7 additions and 1 deletions
|
@ -463,6 +463,12 @@ general_config() {
|
||||||
create_empty_zone "$mynet.in-addr.arpa"
|
create_empty_zone "$mynet.in-addr.arpa"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
local need_reload=
|
||||||
|
|
||||||
|
cp -p $conf_local_file ${conf_local_file}_
|
||||||
|
cmp -s $conf_local_file ${conf_local_file}_ || need_reload=1
|
||||||
|
rm -f ${conf_local_file}_
|
||||||
|
|
||||||
cat <<EOF > $conf_local_file
|
cat <<EOF > $conf_local_file
|
||||||
zone "$domain" {
|
zone "$domain" {
|
||||||
type master;
|
type master;
|
||||||
|
@ -488,7 +494,7 @@ zone "$mynet.in-addr.arpa" {
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
/etc/init.d/named reload
|
[ -n "$need_reload" ] && /etc/init.d/named reload
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
Loading…
Reference in a new issue