summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVyacheslav Yurkov <v.yurkov@precitec.de>2022-09-07 21:51:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-09 12:24:43 +0100
commitd99391f03576de2392b9a35f663390c284eb7dce (patch)
tree51fcc1c706e494ac8635b2a7575c64b18701b9a7
parente38ef4dcf13f365d018f44fc0216ff596ee94681 (diff)
downloadpoky-d99391f03576de2392b9a35f663390c284eb7dce.tar.gz
files: overlayfs-etc: refactor preinit template
(From OE-Core rev: ad5b2bffbee6ddcf51bc146d1e76c980b498b399) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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!"