initial commit

This commit is contained in:
Mikaël Cluseau
2019-02-06 14:34:03 +11:00
commit 169edc5c49
5 changed files with 92 additions and 0 deletions

19
enter-chroot Executable file
View File

@ -0,0 +1,19 @@
#! /bin/bash
cleanup() {
umount -R chroot
}
set -ex
mkdir -p chroot/{dev,proc,sys,output} output
mount --bind chroot chroot
mount --bind output chroot/output
mount --bind /dev chroot/dev
mount --bind /proc chroot/proc
mount --bind /sys chroot/sys
trap cleanup EXIT
chroot chroot "$@"