Pi-hole records: mount addn-hosts into FTL hostsdir, not dnsmasq.d

FTL's generated dnsmasq.conf has no conf-dir: /etc/dnsmasq.d/ is never
read (the 2026-08-24 scratch-name test proved the file was inert; names
only resolved from the query cache). The only file-based local-record
mechanism is hostsdir=/etc/pihole/hosts. Mount the record file there.
Doc: record the pitfall in Pi-hole.md.
This commit is contained in:
Frank committed 2026-08-24 14:26:58 -07:00
1 parent 0f59316be9
commit 35c3fc9ff5
3 files changed
+17 -5

No files matched your search

+6 -2
View File
@@ -40,8 +40,12 @@ HOSTS="$PIHOLE_DIR/addn-hosts"
grep -q '^EnvironmentFile=/home/dank/Containers/pihole/env$' "$QUADLET"
}
@test "the pihole quadlet mounts the addn-hosts record file read-only" {
grep -qE '^Volume=/home/dank/Containers/pihole/addn-hosts:/etc/dnsmasq\.d/addn-hosts:ro$' "$QUADLET"
@test "the pihole quadlet mounts the addn-hosts record file into the FTL hostsdir" {
# FTL (a dnsmasq fork) does not read /etc/dnsmasq.d/ (the generated
# dnsmasq.conf has no conf-dir). Its only file-based local-record
# mechanism is hostsdir=/etc/pihole/hosts (each file parsed as an
# /etc/hosts file). Mount the record file there, read-only.
grep -qE '^Volume=/home/dank/Containers/pihole/addn-hosts:/etc/pihole/hosts/addn-hosts:ro$' "$QUADLET"
}
@test "the pihole env example has placeholder values only" {