summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_chroot
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lh_binary_chroot')
-rwxr-xr-xhelpers/lh_binary_chroot23
1 files changed, 21 insertions, 2 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 50d3d67..c0727e0 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" ]