summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/files/overlayfs-etc-preinit.sh.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/files/overlayfs-etc-preinit.sh.in b/meta/files/overlayfs-etc-preinit.sh.in
index 43c9b04eb9..0e80849f12 100644
--- a/meta/files/overlayfs-etc-preinit.sh.in
+++ b/meta/files/overlayfs-etc-preinit.sh.in
@@ -15,19 +15,23 @@ mount -t sysfs sysfs /sys
15 15
16[ -z "$CONSOLE" ] && CONSOLE="/dev/console" 16[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
17 17
18BASE_OVERLAY_ETC_DIR={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc
19UPPER_DIR=$BASE_OVERLAY_ETC_DIR/upper
20WORK_DIR=$BASE_OVERLAY_ETC_DIR/work
21
18mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} 22mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}
19if mount -n -t {OVERLAYFS_ETC_FSTYPE} \ 23if mount -n -t {OVERLAYFS_ETC_FSTYPE} \
20 -o {OVERLAYFS_ETC_MOUNT_OPTIONS} \ 24 -o {OVERLAYFS_ETC_MOUNT_OPTIONS} \
21 {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT} 25 {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT}
22then 26then
23 mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper 27 mkdir -p $UPPER_DIR
24 mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work 28 mkdir -p $WORK_DIR
25 mount -n -t overlay \ 29 mount -n -t overlay \
26 -o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper \ 30 -o upperdir=$UPPER_DIR \
27 -o lowerdir=/etc \ 31 -o lowerdir=/etc \
28 -o workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work \ 32 -o workdir=$WORK_DIR \
29 -o index=off,xino=off,redirect_dir=off,metacopy=off \ 33 -o index=off,xino=off,redirect_dir=off,metacopy=off \
30 {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || \ 34 $UPPER_DIR /etc || \
31 echo "PREINIT: Mounting etc-overlay failed!" 35 echo "PREINIT: Mounting etc-overlay failed!"
32else 36else
33 echo "PREINIT: Mounting </data> failed!" 37 echo "PREINIT: Mounting </data> failed!"