diff options
Diffstat (limited to 'helpers/lh_binary_chroot')
-rwxr-xr-x | helpers/lh_binary_chroot | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index 50d3d675d..c0727e06a 100755 --- a/helpers/lh_binary_chroot +++ b/helpers/lh_binary_chroot @@ -50,12 +50,31 @@ Create_lockfile .lock # Normally, virtual filesystems are not mounted here, but people tend to be lazy if [ -f chroot/proc/version ] then - ${LH_ROOT_COMMAND} umount chroot/proc + if [ "${LH_USE_FAKEROOT}" != "enabled" ] +then + ${LH_ROOT_COMMAND} umount chroot/proc + else + rm -rf chroot/proc + mkdir -p chroot/proc + fi fi if [ -d chroot/sys/kernel ] then - ${LH_ROOT_COMMAND} umount chroot/sys + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + ${LH_ROOT_COMMAND} umount chroot/sys + else + rm -rf chroot/sys + mkdir -p chroot/sys + fi +fi + +# Copying /dev if using fakeroot +if [ "${LH_USE_FAKEROOT}" = "enabled" ] +then + rm -rf chroot/dev + find /dev | cpio -dmpu chroot fi if [ "${LH_CHROOT_BUILD}" = "disabled" ] |