Verison 1.0.3 Release
Based on Buildbotics 0.4.14
This commit is contained in:
17
scripts/demo-chroot
Normal file
17
scripts/demo-chroot
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
ROOT="$PWD/demo"
|
||||
|
||||
# Clean up on EXIT
|
||||
function cleanup {
|
||||
umount "$ROOT"/{dev/pts,dev,sys,proc} 2>/dev/null || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# mount binds
|
||||
mount --bind /dev "$ROOT/dev/"
|
||||
mount --bind /sys "$ROOT/sys/"
|
||||
mount --bind /proc "$ROOT/proc/"
|
||||
mount --bind /dev/pts "$ROOT/dev/pts"
|
||||
|
||||
chroot "$ROOT" "$@"
|
||||
Reference in New Issue
Block a user