git.99rst.org
/
openwrt-packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
e27b265
)
isc-dhcp: avoid gratuitous reload of named
author
Philip Prindeville
<redacted>
Wed, 5 Oct 2022 17:18:33 +0000
(11:18 -0600)
committer
Philip Prindeville
<redacted>
Wed, 5 Oct 2022 17:19:37 +0000
(11:19 -0600)
Signed-off-by: Philip Prindeville <redacted>
net/isc-dhcp/files/dhcpd.init
patch
|
blob
|
history
diff --git
a/net/isc-dhcp/files/dhcpd.init
b/net/isc-dhcp/files/dhcpd.init
index e849a387d4820eda27f21692001092c34d289422..e72cb3797704d0d1dff25839b9365a1a65c3870a 100755
(executable)
--- a/
net/isc-dhcp/files/dhcpd.init
+++ b/
net/isc-dhcp/files/dhcpd.init
@@
-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
git clone https://git.99rst.org/PROJECT