diff options
author | Daniel Baumann <daniel@debian.org> | 2009-12-23 22:27:18 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2009-12-23 22:27:18 +0100 |
commit | ff1e5377a867de1a57dbc2f17aaaa378d4ed17fd (patch) | |
tree | d366eaa164c1f7864b452cfcc9d7b8a7247b81b5 /helpers | |
parent | 199a6035febe64e0e2eafc6874b11b5d759b1c2e (diff) | |
download | vyos-live-build-ff1e5377a867de1a57dbc2f17aaaa378d4ed17fd.tar.gz vyos-live-build-ff1e5377a867de1a57dbc2f17aaaa378d4ed17fd.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 |