windvn/path/fchroot

8 lines
203 B
Plaintext
Raw Normal View History

2022-05-10 10:50:10 +00:00
#!/usr/bin/env bash
2022-05-10 20:50:49 +00:00
set -e
2022-05-10 10:50:10 +00:00
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}
2022-05-10 20:52:22 +00:00
fchroot-end "$1"