diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-10-19 10:20:17 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-10-19 10:20:17 +0300 |
commit | 24a0ee3dbd482199a82872a5a2e6192a2c873fe2 (patch) | |
tree | 23d44afbe8d764f1540febdad7047e0d85d7ecb8 /initramfs-init.in | |
parent | 230641798db191ca70f954aa4946512da206d7dd (diff) | |
download | mkinitfs-24a0ee3dbd482199a82872a5a2e6192a2c873fe2.tar.bz2 mkinitfs-24a0ee3dbd482199a82872a5a2e6192a2c873fe2.tar.xz |
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.
Diffstat (limited to 'initramfs-init.in')
-rwxr-xr-x | initramfs-init.in | 5 |
1 files changed, 5 insertions, 0 deletions
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 |