home: hub: mkinitfs

Download patch

ref: 24a0ee3dbd482199a82872a5a2e6192a2c873fe2
parent: 230641798db191ca70f954aa4946512da206d7dd
author: Timo Teräs <timo.teras@iki.fi>
date: Mon Oct 19 05:20:17 CDT 2015

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.

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -773,11 +773,16 @@
 	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