Fixes:
| E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Closes grml/grml#53
function umount_all
{
- for i in $MOUNTED_; do
+ local reverse=$(echo $MOUNTED_ | awk '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }')
+ for i in $reverse; do
umount "${DEST_}/$i"
done
}
die "Wrong number of arguments."
fi
+if ! which awk >/dev/null 2>&1 ; then
+ die "No awk binary found, required for execution."
+fi
+
DEST_="$1"; shift
if [ ! -d "$DEST_" ]; then
mountit "proc" "proc"
mountit "sysfs" "sys"
mountit "/dev" "dev" "--bind"
+mountit "devpts" "dev/pts"
WROTE_DEBIAN_CHROOT=""
if [ ! -f "$DEST_"/etc/debian_chroot ]; then