Since the RFC-1918 in-addr.arpa empty zones are automatically created,
they will exist, but we can't use modzone on them because that's not
how things work.
Signed-off-by: Philip Prindeville <redacted>
UPSTREAM_NAME:=dhcp
PKG_REALVERSION:=4.4.3-P1
PKG_VERSION:=4.4.3_p1
-PKG_RELEASE:=14
+PKG_RELEASE:=15
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
chown bind:bind "$zpath" || return 1
chmod 0664 "$zpath" || return 1
- # if the zone doesn't exist, we need to add it, otherwise we need to
- # create it.
+ # if the zone doesn't exist, or a RFC-1918 in-addr.arpa zone, then
+ # we need to add it, otherwise we need to create it.
if ! rndc zonestatus $zone >/dev/null 2>&1; then
command="addzone"
else
command="modzone"
fi
+ case "$zone" in
+ 10.in-addr.arpa|1[6789].172.in-addr.arpa|2[0-9].172.in-addr.arpa|3[01].172.in-addr.arpa|168.192.in-addr.arpa)
+ command="addzone" ;;
+ esac
+
if ! error=$(rndc $command $zone "{
type primary;
file \"$zpath\";