diff options
author | Daniel Baumann <daniel@debian.org> | 2009-12-23 22:27:18 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:03 +0100 |
commit | 45406a5c987a2e4510dbb5df06c93ed302228fc0 (patch) | |
tree | d366eaa164c1f7864b452cfcc9d7b8a7247b81b5 /helpers | |
parent | 6d215be0e7cf165c6fe14d265e7dfdc66dccbc05 (diff) | |
download | vyos-live-build-45406a5c987a2e4510dbb5df06c93ed302228fc0.tar.gz vyos-live-build-45406a5c987a2e4510dbb5df06c93ed302228fc0.zip |
Making unmount routines a bit more robust.
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/lh_chroot_devpts | 4 |
1 files changed, 3 insertions, 1 deletions
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 |