diff options
-rw-r--r-- | archinstall.sh | 15 | ||||
-rw-r--r-- | stages/first_stage.sh | 25 |
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 |