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
1 changed files with 3 additions and 2 deletions
|
@ -466,8 +466,6 @@ general_config() {
|
||||||
local need_reload=
|
local need_reload=
|
||||||
|
|
||||||
cp -p $conf_local_file ${conf_local_file}_
|
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" {
|
||||||
|
@ -494,6 +492,9 @@ zone "$mynet.in-addr.arpa" {
|
||||||
EOF
|
EOF
|
||||||
done
|
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
|
[ -n "$need_reload" ] && /etc/init.d/named reload
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue