]> code.ossystems Code Review - openembedded-core.git/commit
populate-volatile.sh: add ROOT_DIR variable to support running at rootfs time
authorChen Qi <Qi.Chen@windriver.com>
Mon, 18 Feb 2013 09:14:49 +0000 (17:14 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Mar 2013 10:59:58 +0000 (10:59 +0000)
commit45396e3edcce4a33fcbef6456f31811f30c26c63
treed933672c0ead40b60c5d3cb43919b76cbd7afe64
parent2217176a9e2b9b9ac3b1e42e0feecb2c84d60f49
populate-volatile.sh: add ROOT_DIR variable to support running at rootfs time

For populate-volatile.sh script to run correctly both at rootfs time and
at system boot time, it needs to be aware of which situation it is now in.

We use the ROOT_DIR variable to indicate whether it is run at rootfs time or
not. ROOT_DIR being "/" indicates that this script is run at system boot time,
otherwise, it is run at rootfs time.

Also, we ignore failures when running this script at rootfs time.
For example, if ${ROOT_DIR}/var/dir1 is symlink to /var/volatile/dir1, it's
possible that the link is a dead link. So if we're going to create some file
under ${ROOT_DIR}/var/dir1, it will fail. But the failure does no harm,
because this script will always run at system boot time to set up the correct
files and directories.

[YOCTO #3406]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh