]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
knot resolver: Move RPZs into /var/lib/knot-resolver/zones
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 May 2026 10:01:28 +0000 (12:01 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 May 2026 10:33:35 +0000 (12:33 +0200)
This is deliberately not backed up since there zones will have to be
fetched in their entirety anyways.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/knot-resolver/config.lua
config/rootfiles/common/knot-resolver
lfs/knot-resolver
src/scripts/update-rpzs

index e95a3c8b25b9987153e38d8a2417775c2e4a51c5..d31e005916fd7733ae5276afe3ffc93c5a5119af 100644 (file)
@@ -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
index 11f90b16586a9320e3d32bd3ad7a1a2ab8ab20b4..a64cfd4ad08e08b548bd03cd5058edec5ecb9f91 100644 (file)
@@ -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
index eae063e40747054b56b52890f187f3c803aa56f5..3d7d65c74b00f3dac5b75499a5ae67757ad46a0b 100644 (file)
@@ -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
index f8cf313a8564343167e6b1ab56ed4003168948e4..24d40c2558696e5aed33c57e5db7bb84e1bad93b 100644 (file)
@@ -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