installer: i am retarded

This commit is contained in:
lelgenio 2019-11-26 01:09:43 -03:00
parent 8aa193cf43
commit 864d7f69eb
1 changed files with 17 additions and 17 deletions

View File

@ -165,22 +165,6 @@ setup() {
local boot_dev="$DRIVE"1
local lvm_dev="$DRIVE"2
if [ -z "$ROOT_PASSWORD" ]
then
echo 'Enter the root password:'
stty -echo
read ROOT_PASSWORD
stty echo
fi
if [ -z "$USER_PASSWORD" ]
then
echo "Enter the password for user $USER_NAME"
stty -echo
read USER_PASSWORD
stty echo
fi
echo 'Creating partitions'
partition_drive "$DRIVE"
@ -262,7 +246,7 @@ setup_lvm() {
vgcreate "$volgroup" "$partition"
# Create a 1GB swap partition
lvcreate -C y -L1G "$volgroup" -n swap
lvcreate --yes -C y -L1G "$volgroup" -n swap
# Use the rest of the space for root
lvcreate --yes -L '30G' "$volgroup" -n root
@ -353,9 +337,25 @@ configure() {
echo 'Configuring PAM'
set_pam
if [ -z "$ROOT_PASSWORD" ]
then
echo 'Enter the root password:'
stty -echo
read ROOT_PASSWORD
stty echo
fi
echo 'Setting root password'
set_root_password "$ROOT_PASSWORD"
if [ -z "$USER_PASSWORD" ]
then
echo "Enter the password for user $USER_NAME"
stty -echo
read USER_PASSWORD
stty echo
fi
echo 'Creating initial user'
create_user "$USER_NAME" "$USER_PASSWORD"