windvn/path/fchroot
2022-05-10 22:52:22 +02:00

8 lines
203 B
Bash
Executable File

#!/usr/bin/env bash
set -e
mount -o bind "/dev" "$1/dev"
mount -o bind "/dev/pts" "$1/dev/pts"
mount -o bind "/sys" "$1/sys"
mount -o bind "/proc" "$1/proc"
chroot "$1" ${@:2}
fchroot-end "$1"