fi
unset UNSHARE
-mounts="proc sys tmp dev dev/pts usr/portage usr/portage/distfiles"
+mounts="proc sys tmp dev dev/pts usr/portage usr/portage/distfiles usr/local/src"
chroot=${0%/*}
case ${chroot} in
cd "${chroot}"
do_umount() {
- mounts=$(mount | grep ${chroot} | awk '{print $3}' | tac)
+ local m mounts=$(mount | grep ${chroot} | awk '{print $3}' | tac)
for m in ${mounts} ; do
- echo "unmounting $m"
- umount $m
+ echo "unmounting ${m}"
+ umount "${m}"
done
if [[ -z ${mounts} ]] ; then
echo "nothing mounted in ${chroot}"