From ba83790488c83520e656a71003147bda45a8c6f5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 10 Nov 2007 18:39:49 +0100 Subject: Adding option to allow building in fakeroot/fakechroot environment, thanks to An-Cheng Huang . --- helpers/lh_chroot_sysfs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'helpers/lh_chroot_sysfs') diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs index f9d1f413f..fef710dd9 100755 --- a/helpers/lh_chroot_sysfs +++ b/helpers/lh_chroot_sysfs @@ -52,11 +52,17 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Create mountpoint - mkdir -p chroot/sys - - # Mounting /sys - ${LH_ROOT_COMMAND} mount sysfs-live -t sysfs chroot/sys + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + # Create mountpoint + mkdir -p chroot/sys + + # Mounting /sys + ${LH_ROOT_COMMAND} mount sysfs-live -t sysfs chroot/sys + else + rm -rf chroot/sys + ln -s /sys chroot/ + fi # Creating stage file Create_stagefile .stage/chroot_sysfs @@ -69,9 +75,15 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Unmounting /sys - #fuser -km chroot/sys - ${LH_ROOT_COMMAND} umount chroot/sys > /dev/null 2>&1 + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + # Unmounting /sys + #fuser -km chroot/sys + ${LH_ROOT_COMMAND} umount chroot/sys > /dev/null 2>&1 + else + rm -rf chroot/sys + mkdir -p chroot/sys + fi # Removing stage file rm -f .stage/chroot_sysfs -- cgit v1.2.3