summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2019-12-15 12:01:08 +0100
committerxengineering <mail2xengineering@protonmail.com>2019-12-15 12:01:08 +0100
commit0887eef1b26803ecb145e05e7a192d5089280ee4 (patch)
treeff93b7875e3f598df24aa3bc7ec539ea143cf672
parent2a64f2483771ede6310b18a94e7301618d8dc4f7 (diff)
downloadarchinstall-0887eef1b26803ecb145e05e7a192d5089280ee4.tar
archinstall-0887eef1b26803ecb145e05e7a192d5089280ee4.tar.zst
archinstall-0887eef1b26803ecb145e05e7a192d5089280ee4.zip
Debug version for new first_stage.sh.
-rw-r--r--archinstall.sh15
-rw-r--r--stages/first_stage.sh25
2 files changed, 24 insertions, 16 deletions
diff --git a/archinstall.sh b/archinstall.sh
index b7d9f28..2dd55a7 100644
--- a/archinstall.sh
+++ b/archinstall.sh
@@ -30,21 +30,19 @@
# Settings
-TESTSERVER="8.8.8.8" # hostnames will not work properly
-NETWORK_DEADLINE=1 # in seconds
+export TESTSERVER="8.8.8.8" # hostnames will not work properly
+export NETWORK_DEADLINE=1 # in seconds
export REPOSITORY_URL="https://github.com/xengineering/archinstall/"
export REPOSITORY_PATH="/opt/archinstall"
export BRANCH_OR_COMMIT="master" # select another branch name or commit hash if needed
export LOG_FILE_PATH="/var/log/archinstall.log"
export CONFIG_FILE_PATH="/etc/archinstall/config.json"
+
# PATH expansion
-export PATH=$PATH:$(REPOSITORY_PATH)/stages
-export PATH=$PATH:$(REPOSITORY_PATH)/util
-echo "New PATH:"
-echo $PATH
-echo ""
+export PATH=$PATH:$REPOSITORY_PATH/stages
+export PATH=$PATH:$REPOSITORY_PATH/util
# Greetings
@@ -107,7 +105,4 @@ echo ""
# Launching first stage
-#bash $REPOSITORY_PATH/bin/first_stage.sh \
-#$REPOSITORY_PATH $LOG_FILE_PATH $CONFIG_FILE_PATH | tee -a $LOG_FILE_PATH
-
bash first_stage.sh | tee -a $LOG_FILE_PATH
diff --git a/stages/first_stage.sh b/stages/first_stage.sh
index 756c8ff..977bff5 100644
--- a/stages/first_stage.sh
+++ b/stages/first_stage.sh
@@ -24,10 +24,23 @@ echo "Entering first_stage.sh - OK"
mkdir $(dirname "$CONFIG_FILE_PATH")
touch $CONFIG_FILE_PATH
python write_config.py $CONFIG_FILE_PATH
-disk=$(python $REPOSITORY_PATH/bin/get_config_string.py $CONFIG_FILE_PATH "disk")
-disk_path=/dev/$disk
-hostname=$(python $REPOSITORY_PATH/bin/get_config_string.py $CONFIG_FILE_PATH "hostname")
-desktop=$(python $REPOSITORY_PATH/bin/get_config_string.py $CONFIG_FILE_PATH "desktop")
+export disk=$(python $REPOSITORY_PATH/bin/get_config_string.py $CONFIG_FILE_PATH "disk")
+export disk_path=/dev/$disk
+export boot_partition_path=$disk_path1
+export root_partition_path=$disk_path2
+export hostname=$(python $REPOSITORY_PATH/bin/get_config_string.py $CONFIG_FILE_PATH "hostname")
+export desktop=$(python $REPOSITORY_PATH/bin/get_config_string.py $CONFIG_FILE_PATH "desktop")
+
+
+# DEBUGGING:
+echo "Printing variables:"
+echo $PATH
+echo $disk
+echo $disk_path
+echo $boot_partition_path
+echo $root_partition_path
+echo $hostname
+echo $desktop
echo "All data on disk '$disk' will be finally lost!"
@@ -49,6 +62,6 @@ bash check_bootmode.sh
bash partition_disk.sh $disk_path
-bash create_filesystems.sh $(disk_path)1 $(disk_path)2
+bash create_filesystems.sh $boot_partition_path $root_partition_path
-bash mount_filesystems.sh $(disk_path)2
+bash mount_filesystems.sh $root_partition_path