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_proc | |
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_proc')
-rwxr-xr-x | helpers/lh_chroot_proc | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/helpers/lh_chroot_proc b/helpers/lh_chroot_proc index 0dc12ab..7d5688d 100755 --- a/helpers/lh_chroot_proc +++ b/helpers/lh_chroot_proc @@ -52,14 +52,20 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Creating mountpoint - mkdir -p chroot/proc + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + # Creating mountpoint + mkdir -p chroot/proc - # Mounting /proc - ${LH_ROOT_COMMAND} mount proc-live -t proc chroot/proc + # Mounting /proc + ${LH_ROOT_COMMAND} mount proc-live -t proc chroot/proc - # Creating stage file - Create_stagefile .stage/chroot_proc + # Creating stage file + Create_stagefile .stage/chroot_proc + else + rm -rf chroot/proc + ln -s /proc chroot/ + fi ;; remove) @@ -69,16 +75,22 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Workaround binfmt-support /proc locking - if [ -e chroot/proc/sys/fs/binfmt_misc/status ] + if [ "${LH_USE_FAKEROOT}" != "enabled" ] then - ${LH_ROOT_COMMAND} umount chroot/proc/sys/fs/binfmt_misc + # Workaround binfmt-support /proc locking + if [ -e chroot/proc/sys/fs/binfmt_misc/status ] + then + ${LH_ROOT_COMMAND} umount chroot/proc/sys/fs/binfmt_misc + fi + + # Unmounting /proc + #fuser -km chroot/proc + ${LH_ROOT_COMMAND} umount chroot/proc > /dev/null 2>&1 + else + rm -rf chroot/proc + mkdir -p chroot/proc fi - # Unmounting /proc - #fuser -km chroot/proc - ${LH_ROOT_COMMAND} umount chroot/proc > /dev/null 2>&1 - # Removing stage file rm -f .stage/chroot_proc ;; |