summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-08-16 19:57:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-17 10:04:31 +0100
commit50914c4a84e0fb6b9bf6bb1864a2d653218753ce (patch)
tree2dbb9e1bacb9eeaae5e144f07f9b2c0cc11693a5 /meta/recipes-core/initscripts
parentfc19114ca409fc3178ae5cbb44db875b12eeedfc (diff)
downloadopenembedded-core-contrib-50914c4a84e0fb6b9bf6bb1864a2d653218753ce.tar.gz
openembedded-core-contrib-50914c4a84e0fb6b9bf6bb1864a2d653218753ce.tar.bz2
openembedded-core-contrib-50914c4a84e0fb6b9bf6bb1864a2d653218753ce.zip
initscripts: support persistent /var/log
Respect VOLATILE_VAR_LOG variable so that if it's set to any valid boolean false value, we could have persistent /var/log on the final image. [YOCTO #6132] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/volatiles1
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb3
2 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index bc17c4553d..201106645d 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -27,7 +27,6 @@ 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/log /var/volatile/log
l root root 0755 /var/run /run
l root root 1777 /var/tmp /var/volatile/tmp
l root root 1777 /tmp /var/tmp
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index a65f1b24a5..7ab0d2bd41 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -102,6 +102,9 @@ do_install () {
install -m 0755 ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
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
+ fi
install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/