1#!/usr/bin/env sh23set -e45DOAS=${DOAS:-"doas"}67if [[ "$#" == "1" ]]; then8 _chroot="$1"9elif [ -z "$CHROOT" ] ; then10 >&2 echo '$CHROOT unset'11 exit 112fi1314if [ ! -d "$_chroot" ] ; then15 >&2 echo "Directory $_chroot not exists"16 exit 117fi181920$DOAS mount -t proc proc $_chroot/proc/21$DOAS mount -t sysfs sys $_chroot/sys/22$DOAS mount -o bind /dev/ $_chroot/dev/23$DOAS mount -o bind /dev/pts/ $_chroot/dev/pts/24$DOAS mount -o bind /run $_chroot/run/