diff options
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 ;; |