From 24a0ee3dbd482199a82872a5a2e6192a2c873fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 19 Oct 2015 10:20:17 +0300 Subject: init: fix tmpfs install during tmpfs install, some package scripts and triggers may require access to /dev, /proc or /sys. make sure those are bind mounted to have them available. they are later on move mounted to the new root. --- initramfs-init.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'initramfs-init.in') diff --git a/initramfs-init.in b/initramfs-init.in index e9cdfe0..af6cfe9 100755 --- a/initramfs-init.in +++ b/initramfs-init.in @@ -773,11 +773,16 @@ if [ "$KOPT_keep_apk_new" != yes ]; then apkflags="$apkflags --clean-protected" [ -n "$ovlfiles" ] && apkflags="$apkflags --overlay-from-stdin" fi +mkdir -p $sysroot/sys $sysroot/proc $sysroot/dev +mount -o bind /sys $sysroot/sys +mount -o bind /proc $sysroot/proc +mount -o bind /dev $sysroot/dev if [ -n "$ovlfiles" ]; then apk add --root $sysroot $repo_opt $apkflags $pkgs <$ovlfiles else apk add --root $sysroot $repo_opt $apkflags $pkgs fi +umount $sysroot/sys $sysroot/proc $sysroot/dev eend $? # unmount ovl mount if needed -- cgit v1.2.3