summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_chroot_devpts4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpers/lh_chroot_devpts b/helpers/lh_chroot_devpts
index 75edab2..9248595 100755
--- a/helpers/lh_chroot_devpts
+++ b/helpers/lh_chroot_devpts
@@ -67,9 +67,11 @@ case "${1}" in
# Unmounting /dev/pts
if [ "${LH_USE_FAKEROOT}" != "true" ]
then
- if Find_files chroot/dev/pts/*
+ if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
then
${LH_ROOT_COMMAND} umount chroot/dev/pts
+ else
+ ${LH_ROOT_COMMAND} umount -f chroot/dev/pts > /dev/null 2>&1 || true
fi
fi