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:
commit
94a605f775
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue