diff options
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/overlayfs-etc-preinit.sh.in | 14 |
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 | ||
18 | BASE_OVERLAY_ETC_DIR={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc | ||
19 | UPPER_DIR=$BASE_OVERLAY_ETC_DIR/upper | ||
20 | WORK_DIR=$BASE_OVERLAY_ETC_DIR/work | ||
21 | |||
18 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} | 22 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} |
19 | if mount -n -t {OVERLAYFS_ETC_FSTYPE} \ | 23 | if 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} |
22 | then | 26 | then |
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!" |
32 | else | 36 | else |
33 | echo "PREINIT: Mounting </data> failed!" | 37 | echo "PREINIT: Mounting </data> failed!" |