init-live.sh: distinguish between a read-only image and a read-write image
authorChen Qi <Qi.Chen@windriver.com>
Wed, 11 Sep 2013 05:01:55 +0000 (13:01 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Sep 2013 10:05:05 +0000 (11:05 +0100)
commitc8c56698f783b8124128a1fbd0deafe6bb1e6c04
tree2243fcebdf038d38fbfb3b73739cd707660803bb
parent75ab1f693da709107153479993f8a69af5b60325
init-live.sh: distinguish between a read-only image and a read-write image

The iso and hddimg share a common concept of 'live image', and they
use the same initramfs and thus the same init. However, that init
script in initramfs made a wrong assumption that the rootfs image
was read-only by itself. This is apparently not true for hddimg.

To make things work as expected, this init script should at least
distinguish between a read-only rootfs image and a read-write one.

This patch adds this ability to the init script. After this change,
the init script would be able to check whether the rootfs image is
read-only or not. If the rootfs image is read-write, the image will
be mounted and then booted directly. No union mounts will be attempted
in this case.

[YOCTO #5164]

(From OE-Core rev: 29f869b68a9017502f75915784a924f0fe9d4be1)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initrdscripts/files/init-live.sh