]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: mark knot.conf tmpfiles config as optional
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 5 Sep 2022 11:54:22 +0000 (13:54 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 5 Sep 2022 15:27:48 +0000 (17:27 +0200)
Since it got removed in the recent knot release.

See: https://github.com/CZ-NIC/knot/commit/a6971a4025133a77b29f6d2b381b40dc0499730c

test/TEST-75-RESOLVED/test.sh
test/units/testsuite-75.sh

index cbf35ee29260fbea227c942a7e406732a0493203..6c63db65fb371d213fe3c6f2fc806a4a0e01e3b4 100755 (executable)
@@ -24,8 +24,8 @@ test_append_files() {
     local workspace="${1:?}"
     # Install knot
     image_install kzonecheck keymgr kjournalprint knotc knotd
-    image_install /lib/tmpfiles.d/knot.conf
     image_install "${ROOTLIBDIR:?}/system/knot.service"
+    image_install -o /lib/tmpfiles.d/knot.conf
     image_install -o /etc/dbus-1/system.d/cz.nic.knotd.conf
     image_install -o /etc/default/knot
 
index 08abc3f272be65146f2c18a297c36bf776536952..81a2ab37d0325ad36c1281ec8437a149c9bdc41c 100755 (executable)
@@ -64,6 +64,12 @@ ln -svf /etc/bind.keys /etc/bind/bind.keys
 # Start the services
 systemctl unmask systemd-networkd systemd-resolved
 systemctl start systemd-networkd systemd-resolved
+# Create knot's runtime dir, since from certain version it's provided only by
+# the package and not created by tmpfiles/systemd
+if [[ ! -d /run/knot ]]; then
+    mkdir -p /run/knot
+    chown -R knot:knot /run/knot
+fi
 systemctl start knot
 # Wait a bit for the keys to propagate
 sleep 4