mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
overlayfs-etc: add option to skip creation of mount dirs
The 'preinit' script can't create mount directories when rootfs is read-only. Add an option to skip this step. The user must make sure that all required directories are already in the rootfs directory layout. Cc: Vyacheslav Yurkov <uvv.mail@gmail.com> (From OE-Core rev: 3d433d8559467d255bd19af2d0999c65ea24a48d) Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d25f6b970f
commit
6f32769afb
@@ -3,12 +3,15 @@
|
||||
echo "PREINIT: Start"
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
mount -o remount,rw /
|
||||
if {CREATE_MOUNT_DIRS}; then
|
||||
mount -o remount,rw /
|
||||
|
||||
mkdir -p /proc
|
||||
mkdir -p /sys
|
||||
mkdir -p /run
|
||||
mkdir -p /var/run
|
||||
mkdir -p /proc
|
||||
mkdir -p /sys
|
||||
mkdir -p /run
|
||||
mkdir -p /var/run
|
||||
mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}
|
||||
fi
|
||||
|
||||
mount -t proc proc /proc
|
||||
mount -t sysfs sysfs /sys
|
||||
@@ -20,7 +23,6 @@ UPPER_DIR=$BASE_OVERLAY_ETC_DIR/upper
|
||||
WORK_DIR=$BASE_OVERLAY_ETC_DIR/work
|
||||
LOWER_DIR=$BASE_OVERLAY_ETC_DIR/lower
|
||||
|
||||
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}
|
||||
|
||||
Reference in New Issue
Block a user