diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-07-23 05:40:12 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-02 09:21:14 +0100 |
commit | ed7d30dc0cdb6d6c56c50ac7a3440c4ed0ee70d3 (patch) | |
tree | b881104637a06cddac4fa62e6e9ef9f2873ea094 /meta/recipes-core/volatile-binds/files/volatile-binds.service.in | |
parent | b0ac481dda99d8f4be8015964fcb2cb01afce08c (diff) | |
download | openembedded-core-contrib-ed7d30dc0cdb6d6c56c50ac7a3440c4ed0ee70d3.tar.gz |
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/volatile-binds/files/volatile-binds.service.in')
-rw-r--r-- | meta/recipes-core/volatile-binds/files/volatile-binds.service.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in new file mode 100644 index 0000000000..32be5b4425 --- /dev/null +++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in @@ -0,0 +1,19 @@ +[Unit] +Description=Bind mount volatile @where@ +DefaultDependencies=false +Before=local-fs.target +RequiresMountsFor=@whatparent@ @whereparent@ +ConditionPathIsReadWrite=@whatparent@ +ConditionPathExists=@where@ +ConditionPathIsReadWrite=!@where@ + +[Service] +Type=oneshot +RemainAfterExit=Yes +StandardOutput=syslog +TimeoutSec=0 +ExecStart=/sbin/mount-copybind @what@ @where@ +ExecStop=/sbin/umount @where@ + +[Install] +WantedBy=local-fs.target |