summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-10 13:23:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-10 16:49:24 +0100
commit1b7785c5379c0abf38005abd056409fcde4e0c38 (patch)
tree615d257b8945e5b66f4c894a346712197ccebe85
parentcf569f5def877b792a873e6612d26affbd480436 (diff)
downloadpoky-1b7785c5379c0abf38005abd056409fcde4e0c38.tar.gz
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>
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh15
1 files changed, 4 insertions, 11 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
index 3a295eea0b..4f3e0d9645 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
@@ -4,16 +4,9 @@
4 4
5[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0 5[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0
6 6
7# Make sure unionfs is in /proc/filesystems 7if [ "$1" = "start" ] ; then
8if ! grep -q unionfs /proc/filesystems; then 8 mkdir -p /var/volatile/lib
9 echo "ERROR: unionfs not supported by kernel!" 9 cp -a /var/lib/* /var/volatile/lib
10 exit 1 10 mount --bind /var/volatile/lib /var/lib
11fi 11fi
12 12
13mkdir -p /var/volatile/lib
14mount -t unionfs -o dirs=/var/volatile/lib:/var/lib=ro none /var/lib
15
16if [ $? != 0 ]; then
17 echo "ERROR: Union mount failed!"
18 exit 1
19fi