diff --git a/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh b/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh index 2e277b5..50556fe 100755 --- a/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh +++ b/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh @@ -26,7 +26,7 @@ mount -n --bind "$TMP_DIR" "$MNT_DST" [ ! -e /dev/urandom ] && mknod "/dev/urandom" c 1 9 && chmod 444 "/dev/urandom" [ ! -e /dev/console ] && mknod "/dev/console" c 1 5 && chmod 660 "/dev/console" -[ ! -e /proc/mounts ] && mount -n -t proc proc /proc +mount -n -t proc proc /proc # default language setting - prevents dpkg error messages export LANG=C @@ -41,6 +41,5 @@ if [ $# -gt 0 ] fi umount -n "$MNT_DST" -# check for an active chroot environment -[ -z "$(ps -e | grep chroot-start.sh)" ] && umount -n proc +umount -n proc || true rm -r "$TMP_DIR"