bind: update conffiles list

The previous patches removed a number of conffiles that weren't necessary,
meaning we can now assume that any changes or additional files in /etc/bind
are things that the user wants to keep.

Since /var/lib/bind is the standard location for longer-lived zone data
(i.e. not zones that secondary servers have obtained via XFER), we symlink
it to /etc/bind/zones so that it survives a sysupgrade.

Temporary files (such as XFER:ed zones for secondaries) stay in
/var/cache/bind.

Signed-off-by: David Härdeman <david@hardeman.nu>
This commit is contained in:
David Härdeman authored and Noah Meyerhans committed 2025-09-13 13:36:41 -07:00
1 parent 7d5e909155
commit 86b84e6775
3 files changed
+10 -4

No files matched your search

+1 -2
View File
@@ -229,8 +229,7 @@ define Package/bind-server/install
endef
define Package/bind-server/conffiles
/etc/bind/db.root
/etc/bind/named.conf
/etc/bind
endef
define Package/bind-server-filter-aaaa/install
+2
View File
@@ -1,6 +1,8 @@
// This is the primary configuration file for the BIND DNS server named.
options {
// Default directory for ephemeral zones, long-lived zones
// can be stored under /var/lib/bind (aka /etc/bind/zones)
directory "/var/cache/bind";
};
+7 -2
View File
@@ -11,8 +11,8 @@ config_dir=/etc/bind
run_dir=/var/run/named
log_dir=/var/log/named
cache_dir=/var/cache/bind
zone_dir=$config_dir/zones
lib_dir=/var/lib/bind
dyn_dir=/tmp/bind
config_file=$config_dir/named.conf
config_local_file=$dyn_dir/named.conf.local
@@ -25,7 +25,7 @@ start_service() {
user_exists bind 57 || user_add bind 57
group_exists bind 57 || group_add bind 57
for dir in $run_dir $log_dir $cache_dir $lib_dir $dyn_dir; do
for dir in $run_dir $log_dir $cache_dir $zone_dir; do
if [ ! -e "$dir" ]; then
mkdir -p "$dir"
fi
@@ -33,6 +33,11 @@ start_service() {
chmod 0775 "$dir"
done
if [ ! -e $lib_dir ]; then
mkdir -p $(dirname $lib_dir)
ln -sf $zone_dir $lib_dir
fi
if [ ! -s /etc/bind/rndc.key ] && [ ! -s /etc/bind/rndc.conf ]; then
rndc-confgen -a
chown bind:bind /etc/bind/rndc.key