From: Michael Tremer Date: Thu, 28 May 2026 10:01:28 +0000 (+0200) Subject: knot resolver: Move RPZs into /var/lib/knot-resolver/zones X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=dffd327d5f981174cc8153cb4dea5a233ebfac2c;p=ipfire-2.x.git knot resolver: Move RPZs into /var/lib/knot-resolver/zones This is deliberately not backed up since there zones will have to be fetched in their entirety anyways. Signed-off-by: Michael Tremer --- diff --git a/config/knot-resolver/config.lua b/config/knot-resolver/config.lua index e95a3c8b2..d31e00591 100644 --- a/config/knot-resolver/config.lua +++ b/config/knot-resolver/config.lua @@ -423,7 +423,7 @@ function config.load_rpzs() local name, status, comment, enabled_zones, custom_acl = unpack(fields) if status == "on" then - local path = string.format("/var/cache/knot-resolver/rpzs/%s.zone", name) + local path = string.format("/var/lib/knot-resolver/zones/%s.zone", name) -- Ensure the zone exists if io.open(path) then diff --git a/config/rootfiles/common/knot-resolver b/config/rootfiles/common/knot-resolver index 11f90b165..a64cfd4ad 100644 --- a/config/rootfiles/common/knot-resolver +++ b/config/rootfiles/common/knot-resolver @@ -272,3 +272,4 @@ var/cache/knot-resolver var/lib/knot-resolver var/lib/knot-resolver/leases.db var/lib/knot-resolver/root.keys +var/lib/knot-resolver/zones diff --git a/lfs/knot-resolver b/lfs/knot-resolver index eae063e40..3d7d65c74 100644 --- a/lfs/knot-resolver +++ b/lfs/knot-resolver @@ -117,6 +117,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # Change the ownership of /var/lib/knot-resolver chown knot-resolver:knot-resolver /var/lib/knot-resolver + # Create a directory for zone files + -mkdir -pv /var/lib/knot-resolver/zones + chown knot-resolver:knot-resolver /var/lib/knot-resolver/zones + # Create cache directory -mkdir -pv /var/cache/knot-resolver chown knot-resolver:knot-resolver /var/cache/knot-resolver diff --git a/src/scripts/update-rpzs b/src/scripts/update-rpzs index f8cf313a8..24d40c255 100644 --- a/src/scripts/update-rpzs +++ b/src/scripts/update-rpzs @@ -19,7 +19,7 @@ # # ############################################################################### -readonly SYNC_PATH="/var/cache/knot-resolver/rpzs" +readonly SYNC_PATH="/var/lib/knot-resolver/zones" readonly ZONE_SYNC_ARGS=( # Be quiet