diff options
-rw-r--r-- | meta/files/overlayfs-etc-preinit.sh.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/files/overlayfs-etc-preinit.sh.in b/meta/files/overlayfs-etc-preinit.sh.in index 2ebb6c9224..e5f5001a05 100644 --- a/meta/files/overlayfs-etc-preinit.sh.in +++ b/meta/files/overlayfs-etc-preinit.sh.in | |||
@@ -16,11 +16,18 @@ mount -t sysfs sysfs /sys | |||
16 | [ -z "$CONSOLE" ] && CONSOLE="/dev/console" | 16 | [ -z "$CONSOLE" ] && CONSOLE="/dev/console" |
17 | 17 | ||
18 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} | 18 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} |
19 | if mount -n -t {OVERLAYFS_ETC_FSTYPE} -o {OVERLAYFS_ETC_MOUNT_OPTIONS} {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT} | 19 | if mount -n -t {OVERLAYFS_ETC_FSTYPE} \ |
20 | -o {OVERLAYFS_ETC_MOUNT_OPTIONS} \ | ||
21 | {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT} | ||
20 | then | 22 | then |
21 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper | 23 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper |
22 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work | 24 | mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work |
23 | mount -n -t overlay -o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper,lowerdir=/etc,workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || echo "PREINIT: Mounting etc-overlay failed!" | 25 | mount -n -t overlay \ |
26 | -o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper \ | ||
27 | -o lowerdir=/etc \ | ||
28 | -o workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work \ | ||
29 | {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || \ | ||
30 | echo "PREINIT: Mounting etc-overlay failed!" | ||
24 | else | 31 | else |
25 | echo "PREINIT: Mounting </data> failed!" | 32 | echo "PREINIT: Mounting </data> failed!" |
26 | fi | 33 | fi |