diff options
| author | Alexander Hill <ahill@breadpudding.dev> | 2025-04-12 19:43:46 -0400 |
|---|---|---|
| committer | Alexander Hill <ahill@breadpudding.dev> | 2025-04-12 19:43:46 -0400 |
| commit | 2a1bf3ec1bc4d08b8dd4881fc30319ac33101b8f (patch) | |
| tree | 03b1d6a10f2a3609aca36d03d45ca8fef5b689c8 /chroot-bootstrap.sh | |
| parent | 691cc97011b7fd4dab12e0274653e62b38879d62 (diff) | |
Renamed two scripts to follow the verb-noun.sh convention
Not really a convention yet, but it just makes sense to use.
Diffstat (limited to 'chroot-bootstrap.sh')
| -rwxr-xr-x | chroot-bootstrap.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chroot-bootstrap.sh b/chroot-bootstrap.sh new file mode 100755 index 0000000..8afe8d0 --- /dev/null +++ b/chroot-bootstrap.sh @@ -0,0 +1,22 @@ +#!/bin/sh +MAPLE=$(pwd)/maple + +if mount --rbind /dev $MAPLE/dev && mount --make-rslave $MAPLE/dev; then + if mount -t proc /proc $MAPLE/proc; then + if mount --rbind /sys $MAPLE/sys && mount --make-rslave $MAPLE/sys; then + if mount --rbind /tmp $MAPLE/tmp; then + if mount --bind /run $MAPLE/run; then + if mount --bind ./sources $MAPLE/maple/sources; then + chroot $MAPLE /bin/sh + umount $MAPLE/maple/sources + fi + umount $MAPLE/run + fi + umount $MAPLE/tmp + fi + umount -R $MAPLE/sys + fi + umount $MAPLE/proc + fi + umount -R $MAPLE/dev +fi
\ No newline at end of file |
