New structure of project and work flow

This commit is contained in:
2020-05-01 19:00:17 -05:00
parent 7da4e4d974
commit c454f0f66f
19 changed files with 196 additions and 703 deletions

42
step_2_chroot.sh Normal file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
. CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
# Debootstrap process
function main() {
sudo mount --bind /dev "${CHROOT_PTH}"/dev
sudo cp /etc/hosts "${CHROOT_PTH}"/etc/hosts
sudo cp /etc/resolv.conf "${CHROOT_PTH}"/etc/resolv.conf
sudo sed s/$SYSTEM_RELEASE/$RELEASE/ < /etc/apt/sources.list > "${CHROOT_PTH}"/etc/apt/sources.list
sudo chroot "${CHROOT_PTH}"
# ---- OLD SETUP ---- #
# ## Set Xephyr and set chrooting mounts
# Xephyr -resizeable -screen "${RES}" "${ID}" &
# cd squashfs-root/
# mount -t proc proc proc/
# mount -t sysfs sys sys/
# mount -o bind /dev dev/
# cp /etc/resolv.conf etc/
#
# ## Enter env with chroot
# chroot . bash
#
# ## Unmount binds
# umount -lf dev/
# umount -lf proc/
# umount -lf sys/
# cd ..
}
main $@;