summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initscripts
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:48:58 +0100
commit5a8ba93efa554c3b4d3b48ca8d668419a8c77f42 (patch)
tree60552bf041822c5f65ba56a9068cc9f6d6437d3b /meta/recipes-core/initscripts
parentf787b8302ed61bdaf1767473b856f31fe5bba28e (diff)
downloadopenembedded-core-5a8ba93efa554c3b4d3b48ca8d668419a8c77f42.tar.gz
openembedded-core-5a8ba93efa554c3b4d3b48ca8d668419a8c77f42.tar.bz2
openembedded-core-5a8ba93efa554c3b4d3b48ca8d668419a8c77f42.zip
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts')
-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 @@
[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0
-# Make sure unionfs is in /proc/filesystems
-if ! grep -q unionfs /proc/filesystems; then
- echo "ERROR: unionfs not supported by kernel!"
- exit 1
+if [ "$1" = "start" ] ; then
+ mkdir -p /var/volatile/lib
+ cp -a /var/lib/* /var/volatile/lib
+ mount --bind /var/volatile/lib /var/lib
fi
-mkdir -p /var/volatile/lib
-mount -t unionfs -o dirs=/var/volatile/lib:/var/lib=ro none /var/lib
-
-if [ $? != 0 ]; then
- echo "ERROR: Union mount failed!"
- exit 1
-fi