]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=true
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Wed, 21 Jul 2021 14:10:16 +0000 (16:10 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Jul 2021 15:33:42 +0000 (16:33 +0100)
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
later.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initscripts/initscripts_1.0.bb

index 5e994f2b7fd0f63c6374a9d38b3612935d848b66..65f9c0ae8d363ecc59421d2a8a0985e8e1a10a21 100644 (file)
@@ -106,7 +106,8 @@ do_install () {
        install -m 0755    ${WORKDIR}/save-rtc.sh       ${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
        fi
        install -m 0755    ${WORKDIR}/dmesg.sh          ${D}${sysconfdir}/init.d
        install -m 0644    ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/