see comment in base-files:
We want to keep lock and run directories volatile, so we will override the whole preinst function here:
delta against upstream: --- yocto/dS/meta-digitalstrom-devel/recipes-core/initscripts/initscripts-1.0/volatiles 2022-12-05 17:58:18.666530292 +0100 +++ yocto/poky-releases/3.1/poky/meta/recipes-core/initscripts/initscripts-1.0/volatiles 2022-06-03 11:10:21.800263967 +0200 ..
A linking example:
l root root 0777 /var/test /tmp/testfile
@@ -22,14 +24,14 @@
a link will be created at /var/test pointing to /tmp/testfile and due to this
link the file defined as /var/test will actually be created as /tmp/testfile.
d root root 1777 /run/lock none +d root root 0755 /var/volatile/log none d root root 1777 /var/volatile/tmp none l root root 1777 /var/lock /run/lock l root root 0755 /var/run /run -d root root 0755 /var/volatile/cache none -d root root 0755 /var/log none l root root 1777 /var/tmp /var/volatile/tmp -l root root 1777 /var/cache /var/volatile/cache l root root 1777 /tmp /var/tmp d root root 0755 /var/lock/subsys none f root root 0664 /var/log/wtmp none f root root 0664 /var/run/utmp none +l root root 0644 /etc/resolv.conf /var/run/resolv.conf +f root root 0644 /var/run/resolv.conf none