Commit Graph

3 Commits

Author SHA1 Message Date
Chris PeBenito
af790692f5 volatile-binds: Change cp to use -a instead of -p.
This is needed on SELinux systems, so the labels (xattrs) are preserved.

(From OE-Core rev: ab7e3caf3e29f2d8db55e2901e0a9b01061afd88)

Signed-off-by: Chris PeBenito <Christopher.PeBenito@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19 12:46:43 +01:00
Matt Hoosier
c4acf1b531 volatile-binds: use overlayfs if available
Copying files from the read-only root filesystem to the tmpfs
providing the volatile directories can be slow and waste memory.
If the kernel supports the overlay filesystem, use it to mount
a writable tmpfs on top of the read-only directory from the
rootfs and avoid copies.

Analogous to the modification made to initscripts's
read-only-rootfs-hook in 370fda1b2e8d5dc011522131bba4106de26bfb19.

(From OE-Core rev: b4976f3cf8cd028f165100b67867adb862da4d7f)

Signed-off-by: Matt Hoosier <matt.hoosier@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20 22:40:16 +01:00
Chen Qi
db15e2d01c volatile-binds: add recipe
This recipe is designed to play a key role in a read-only rootfs
of systemd based systems. It generates service files from a template,
volatile-binds.service.in and the VOLATILE_BINDS variable.

By default, VOLATILE_BINDS takes the value of "/var/volatile/lib /var/lib\n",
which leads to the generation of volatile-var-lib.service file.
This file doesn't have any effect in a read-write system, as it
has "ConditionPathIsReadWrite = !/var/lib" in the [Unit] section.
In other words, this file only has effect in a read-only rootfs.

(From OE-Core rev: ed7d30dc0cdb6d6c56c50ac7a3440c4ed0ee70d3)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02 09:26:14 +01:00