diff options
-rw-r--r-- | meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh | 15 |
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 | 7 | if [ "$1" = "start" ] ; then |
8 | if ! 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 |
11 | fi | 11 | fi |
12 | 12 | ||
13 | mkdir -p /var/volatile/lib | ||
14 | mount -t unionfs -o dirs=/var/volatile/lib:/var/lib=ro none /var/lib | ||
15 | |||
16 | if [ $? != 0 ]; then | ||
17 | echo "ERROR: Union mount failed!" | ||
18 | exit 1 | ||
19 | fi | ||