[oe] [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories
Holger Hans Peter Freyther
holger+oe at freyther.de
Fri Sep 14 16:59:33 UTC 2012
From: Holger Hans Peter Freyther <zecke at selfish.org>
The base-files create symlinks from /var/{log,tmp,lock,cache,run} to
the /var/volatile. The directories are created by sysv initscripts.
Use the systemd-tmpfiles to create the directories. One needs to be
careful with the naming of the file as systemd first collects all
*.conf files, sorts them by name and is parsing them then. Make sure
the new file is parsed before the systemd.conf.
---
.../systemd/systemd/create-volatile.conf | 11 +++++++++++
meta-systemd/recipes-core/systemd/systemd_git.bb | 4 +++-
2 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
diff --git a/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf b/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
new file mode 100644
index 0000000..afcf8c3
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
@@ -0,0 +1,11 @@
+# This goes hand-in-hand with the base-files of OE-Core. The file must
+# be sorted before 'systemd.conf' becuase this attempts to create a file
+# inside /var/log.
+
+
+d /var/volatile/cache - - - -
+d /var/volatile/log - - - -
+d /var/volatile/lock - - - -
+d /var/volatile/run - - - -
+d /var/volatile/tmp - - - -
+
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
index 09bc635..2b245c0 100644
--- a/meta-systemd/recipes-core/systemd/systemd_git.bb
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -19,7 +19,7 @@ inherit gitpkgv
PKGV = "v${GITPKGVTAG}"
PV = "git"
-PR = "r6"
+PR = "r7"
inherit useradd pkgconfig autotools perlnative
@@ -31,6 +31,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
file://touchscreen.rules \
file://modprobe.rules \
file://var-run.conf \
+ file://create-volatile.conf \
${UCLIBCPATCHES} \
"
UCLIBCPATCHES = ""
@@ -97,6 +98,7 @@ do_install() {
install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/
+ install -m 0644 ${WORKDIR}/create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
}
python populate_packages_prepend (){
--
1.7.9.5
More information about the Openembedded-devel
mailing list