read-only-rootfs-hook.sh: check before bind mounting /var/lib
authorChen Qi <Qi.Chen@windriver.com>
Mon, 26 Aug 2013 06:43:55 +0000 (14:43 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 26 Aug 2013 12:19:42 +0000 (13:19 +0100)
commit5772a51af8c93d0f1c3a41b9415785ce0d64e07f
tree7382f4e073caf97171577d3aca5e00fd3ea6e227
parent001f64716184d461aa52ec15f33452ed024aedd2
read-only-rootfs-hook.sh: check before bind mounting /var/lib

It's possible that /var/lib is on a separate writable partition. In such
situation, we should not bind mount /var/lib with tmpfs, becasue it's
already writable.

This patch fixes this problem by checking whether /var/lib is already
on a writable partition.

[YOCTO #4888]

(From OE-Core rev: 86ac10995fd08226f82d87e23fda5d4898c3190f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh