Merge pull request #19532 from pprindeville/isc-dhcp-drop-gratuitous-named-reload

isc-dhcp: avoid gratuitous reload of named
This commit is contained in:
Philip Prindeville 2022-10-05 16:01:33 -06:00 committed by GitHub
commit 38b73c0a28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -463,6 +463,12 @@ general_config() {
create_empty_zone "$mynet.in-addr.arpa"
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
zone "$domain" {
type master;
@ -488,7 +494,7 @@ zone "$mynet.in-addr.arpa" {
EOF
done
/etc/init.d/named reload
[ -n "$need_reload" ] && /etc/init.d/named reload
sleep 1
cat <<EOF