From ff1e5377a867de1a57dbc2f17aaaa378d4ed17fd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 23 Dec 2009 22:27:18 +0100 Subject: Making unmount routines a bit more robust. --- helpers/lh_chroot_devpts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'helpers') diff --git a/helpers/lh_chroot_devpts b/helpers/lh_chroot_devpts index 75edab23f..9248595d1 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 -- cgit v1.2.3