Merge pull request #19866 from pprindeville/isc-dhcpd-detect-reload-properly

isc-dhcp: Fix logic to detect if the config file is unchanged
This commit is contained in:
Philip Prindeville 2022-11-11 10:08:15 -07:00 committed by GitHub
commit 94a605f775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -466,8 +466,6 @@ general_config() {
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" {
@ -494,6 +492,9 @@ zone "$mynet.in-addr.arpa" {
EOF
done
cmp -s $conf_local_file ${conf_local_file}_ || need_reload=1
rm -f ${conf_local_file}_
[ -n "$need_reload" ] && /etc/init.d/named reload
sleep 1