From: Vyacheslav Yurkov <uvv.mail@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Vyacheslav Yurkov <v.yurkov@precitec.de>
Subject: [PATCH 3/5] files: overlayfs-etc: refactor preinit template
Date: Wed, 7 Sep 2022 21:51:37 +0200 [thread overview]
Message-ID: <20220907195139.814465-3-uvv.mail@gmail.com> (raw)
In-Reply-To: <20220907195139.814465-1-uvv.mail@gmail.com>
From: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
---
meta/files/overlayfs-etc-preinit.sh.in | 14 +++++++++-----
1 file 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
[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
+BASE_OVERLAY_ETC_DIR={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc
+UPPER_DIR=$BASE_OVERLAY_ETC_DIR/upper
+WORK_DIR=$BASE_OVERLAY_ETC_DIR/work
+
mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}
if mount -n -t {OVERLAYFS_ETC_FSTYPE} \
-o {OVERLAYFS_ETC_MOUNT_OPTIONS} \
{OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT}
then
- mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper
- mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work
+ mkdir -p $UPPER_DIR
+ mkdir -p $WORK_DIR
mount -n -t overlay \
- -o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper \
+ -o upperdir=$UPPER_DIR \
-o lowerdir=/etc \
- -o workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work \
+ -o workdir=$WORK_DIR \
-o index=off,xino=off,redirect_dir=off,metacopy=off \
- {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || \
+ $UPPER_DIR /etc || \
echo "PREINIT: Mounting etc-overlay failed!"
else
echo "PREINIT: Mounting </data> failed!"
--
2.30.2
next prev parent reply other threads:[~2022-09-07 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 19:51 [PATCH 1/5] oeqa/selftest: drop image_feature test from overlayfs Vyacheslav Yurkov
2022-09-07 19:51 ` [PATCH 2/5] classes: Update overlayfs classes to use new bitbake functionality Vyacheslav Yurkov
2022-09-07 19:51 ` Vyacheslav Yurkov [this message]
2022-09-07 19:51 ` [PATCH 4/5] classes: files: Extend overlayfs-etc class Vyacheslav Yurkov
2022-09-07 19:51 ` [PATCH 5/5] oeqa/selftest: Add lower layer test for overlayfs-etc Vyacheslav Yurkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220907195139.814465-3-uvv.mail@gmail.com \
--to=uvv.mail@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=v.yurkov@precitec.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox