All of
 help / color / mirror / Atom feed
From: "Matthias Schiffer" <>
Cc: Matthias Schiffer <>
Subject: [PATCH 3/3] initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=true
Date: Wed, 21 Jul 2021 16:10:16 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>
In-Reply-To: <>

Create the /var/log symlink directly after /var/volatile/log, so
/var/log is available for the creation of /var/log/wtmp a few lines

Signed-off-by: Matthias Schiffer <>

An alternative solution would be to move the creation of the /var/log
link (and possibly /var/volatile/log itself) to a separate volatile list
that is applied before 00_core. This would simplify the code and improve
compatiblity with patch [1] (currently applied downstream by
WindRiver Linux, I'm not sure what the status is regarding inclusion in
OpenEmbedded core).


 meta/recipes-core/initscripts/ | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/initscripts/ b/meta/recipes-core/initscripts/
index 5e994f2b7f..65f9c0ae8d 100644
--- a/meta/recipes-core/initscripts/
+++ b/meta/recipes-core/initscripts/
@@ -106,7 +106,8 @@ do_install () {
 	install -m 0755    ${WORKDIR}/	${D}${sysconfdir}/init.d
 	install -m 0644    ${WORKDIR}/volatiles		${D}${sysconfdir}/default/volatiles/00_core
 	if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then
-		echo "l root root 0755 /var/log /var/volatile/log" >> ${D}${sysconfdir}/default/volatiles/00_core
+		sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \
+			${D}${sysconfdir}/default/volatiles/00_core
 	install -m 0755    ${WORKDIR}/		${D}${sysconfdir}/init.d
 	install -m 0644    ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/

      parent reply	other threads:[~2021-07-21 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 14:10 [PATCH 1/3] initscripts: do not log to tty0 Matthias Schiffer
2021-07-21 14:10 ` [PATCH 2/3] initscripts: run create_file synchronously Matthias Schiffer
2021-07-21 14:10 ` Matthias Schiffer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \
    --subject='Re: [PATCH 3/3] initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=true' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.