diff mbox series

[5/5] eudev: create dir /tmp if persistent tmp is used

Message ID 20231208101253.4042712-7-changqing.li@windriver.com
State New
Headers show
Series *** Fix persistent tmp *** | expand

Commit Message

Changqing Li Dec. 8, 2023, 10:12 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

the automount rule for udev needs /tmp directory available, if
VOLATILE_TMP_DIR = yes, to make sure /var/volatile/tmp exist, if
VOLATILE_TMP_DIR = no, to make sure /tmp exist.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-core/udev/eudev_3.2.14.bb | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-core/udev/eudev_3.2.14.bb b/meta/recipes-core/udev/eudev_3.2.14.bb
index d0758691bd..d89697a916 100644
--- a/meta/recipes-core/udev/eudev_3.2.14.bb
+++ b/meta/recipes-core/udev/eudev_3.2.14.bb
@@ -50,6 +50,10 @@  do_install:append() {
 
 	# Use classic network interface naming scheme
 	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+
+    if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ]; then
+        sed -i -e 's%mkdir -m 1777 -p /var/volatile/tmp%mkdir -m 1777 -p /tmp%g' ${D}${sysconfdir}/init.d/udev
+    fi
 }
 
 do_install:prepend:class-target () {