diff options
author | Daniel Baumann <daniel@debian.org> | 2007-11-10 18:39:49 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:28 +0100 |
commit | ba83790488c83520e656a71003147bda45a8c6f5 (patch) | |
tree | 3bf6760140cc4af0264925a1d865a7025392692d /helpers/lh_chroot_sysfs | |
parent | ee91e98161fcd14e1c28f659357d33e9fda7019b (diff) | |
download | live-build-ba83790488c83520e656a71003147bda45a8c6f5.zip live-build-ba83790488c83520e656a71003147bda45a8c6f5.tar.gz |
Adding option to allow building in fakeroot/fakechroot environment, thanks to An-Cheng Huang <ancheng@vyatta.com>.
Diffstat (limited to 'helpers/lh_chroot_sysfs')
-rwxr-xr-x | helpers/lh_chroot_sysfs | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs index f9d1f41..fef710d 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 |