Setting up chroot logic
This commit is contained in:
14
start.sh
14
start.sh
@@ -8,26 +8,20 @@
|
||||
. CONFIG.sh
|
||||
|
||||
function main() {
|
||||
sanity_check
|
||||
if [[ $? -eq 1 ]]; then echo "\nExiting..."; return; fi
|
||||
if [[ $(sanity_check) -eq 1 ]]; then echo "\nExiting..."; return; fi
|
||||
|
||||
# First setup the debootstrap env...
|
||||
./step_1_debootstrap.sh
|
||||
# Then setup and run chroot
|
||||
# ./step_2_chroot.sh
|
||||
./step_2_chroot.sh
|
||||
}
|
||||
|
||||
|
||||
function sanity_check() {
|
||||
clear;
|
||||
echo "Working Dir: " $(pwd) "\n";
|
||||
|
||||
# Make work structure
|
||||
mkdir -p work/chroot ;
|
||||
|
||||
# Check for debootstrap command and then install from downloaded deb if not present.
|
||||
# we could install from current apt buti want the user and myself to be fully aware
|
||||
# of what they are chosing. IE, they could just run the install command themselves...
|
||||
# We could install from current apt but I want the user and myself to be fully aware
|
||||
# of what they are chosing. IE, we could just run the install command themselves...
|
||||
debootstrap_comm=$(which debootstrap)
|
||||
if [[ "${debootstrap_comm}" == "" ]]; then
|
||||
echo "No deboostrap command found so will try installing from local directory...\n"
|
||||
|
||||
Reference in New Issue
Block a user