From 95c84238ed669ce37badf419f1dc2cb2a50ce6d6 Mon Sep 17 00:00:00 2001 From: proledatarian Date: Mon, 14 Feb 2022 13:48:27 +0000 Subject: [PATCH] Update install.sh --- install.sh | 86 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 31 deletions(-) diff --git a/install.sh b/install.sh index e2f0955..cc2314d 100644 --- a/install.sh +++ b/install.sh @@ -1,8 +1,22 @@ #!/bin/bash +### Variables: +# $dsks = whole lsblk output (e.g. "sda 1,0T, sdb ..") +# $disk = only selected disk (e.g. "sdc 500G") +# $dev = selected disk without size (e.g. "sdd") +# $main = main partition (e.g. "sde2") +# $szmn = size of the main partition (e.g. "50") +# szrt = size of root LVM volume +# $boot = boot partition (e.g. "sdf1") +# $host = hostname +# $user = username +# $pwur = user password +# $pwrt = root password +# $pwcr = encryption password + # Friendly introduction. echo "Welcome to the Arch Linux installation script!" -echo "This script will ERASE ALL DATA on the partition you choose in the next step." +echo "This script will ERASE ALL DATA on the partition you will choose next!" echo read -p "Do you want to continue? Type [Y]es or [N]o. " -n 1 -r echo # (optional) move to a new line @@ -29,6 +43,42 @@ declare -a dsks select dev in ${dsks[*]} do +echo "Choose a strong password for encrypting the primary partition:" +while [ -z "$pwcr" ]; do +echo "Please enter a password: " +read -s pwfr +read -s -p "Retype a password: " pwsc +if [ $pwfr == $pwsc ]; +then + pwcr=$pwfr + echo + echo "Both passwords are the same. Continuing.." +else + echo + echo "You have entered different passwords. Try again.." +fi + +# Ask for everything that is necessary later. +#echo "Before installing the system, please enter a hostname:" +#echo +#read host +#echo + +#echo "Please enter a password for the root account:" +#read pwr +#echo + +#echo "And please enter a username:" +#read user +#echo +# +#echo "Also please enter a password for your user:" +#read pwu +#echo +# +#echo "System is getting installed.." +#echo + # Separate values by spaces. IFS=' ' @@ -66,33 +116,28 @@ lsblk | grep "$dev" sleep 1 echo -# This needs to be deleted. -echo $dev > /tmp/dev - # Exit. break done -# This needs to be deleted. -# Get variable from filesystem. -main=$(