poky/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
Paul Eggleton 4cb8950b29 initscripts: fix read-only-rootfs-hook.sh to avoid using unionfs
Unionfs isn't available everywhere, and we can get similar results (if
not quite as neatly) by using bind mounts + tmpfs and copying the data
over.

(From OE-Core rev: 5a8ba93efa554c3b4d3b48ca8d668419a8c77f42)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:49:28 +01:00

13 lines
211 B
Bash

#!/bin/sh
. /etc/default/rcS
[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0
if [ "$1" = "start" ] ; then
mkdir -p /var/volatile/lib
cp -a /var/lib/* /var/volatile/lib
mount --bind /var/volatile/lib /var/lib
fi