Cleanup: overlay mount setup

- initrd can use the handy wrapper script from the rootfs
 - we don't need to initialize the overlay dir, the wrapper script does that

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-03-29 19:03:13 +01:00
parent e0de98bf7d
commit 013692b999
1 changed files with 1 additions and 8 deletions

View File

@ -85,14 +85,7 @@ fi
if [ ! -z "$overlay_dev" ]; then
mount_device "$overlay_dev" "/newroot/cfg/overlay" "$overlay_type"
mkdir -p /newroot/cfg/overlay/etc
mkdir -p /newroot/cfg/overlay/etc_work
mkdir -p /newroot/cfg/overlay/var_lib
mkdir -p /newroot/cfg/overlay/var_lib_work
mkdir -p /newroot/cfg/overlay/usr
mkdir -p /newroot/cfg/overlay/usr_work
chroot /newroot mount -n -t overlay overlay -olowerdir=/cfg/preserve/etc,upperdir=/cfg/overlay/etc,workdir=/cfg/overlay/etc_work /etc
chroot /newroot /lib/libexec/init/overlay.sh etc /etc
else
chroot /newroot mount --bind "/cfg/preserve/etc" "/etc"
fi