refactor
This commit is contained in:
parent
60e2d7bca8
commit
1076254393
@ -68,7 +68,6 @@ partition () {
|
||||
|
||||
|
||||
echoc " - Formatting disk..." $GREEN
|
||||
|
||||
#DANGER ZONE
|
||||
parted --script $DISK -- mklabel gpt mkpart ESP fat32 1Mib 500MiB set 1 boot on mkpart primary ext4 500MiB 100%
|
||||
|
||||
@ -85,11 +84,12 @@ partition () {
|
||||
mkdir /mnt/boot
|
||||
mount ${DISK}1 /mnt/boot
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
sysinstall () {
|
||||
echoc " - Updating mirror list. This might take a while." $YELLOW
|
||||
#reflector --protocol https --sort rate --country 'United States' --save /etc/pacman.d/mirrorlist --verbose
|
||||
echoc " - Updating mirror list. This might take a while." $GREEN
|
||||
reflector --protocol https --sort rate --country 'United States' --save /etc/pacman.d/mirrorlist --verbose
|
||||
|
||||
echoc " - Installing system." $GREEN
|
||||
pacstrap /mnt base linux linux-firmware nano
|
||||
@ -106,11 +106,16 @@ sysinstall () {
|
||||
echoc " - Setting Hostname." $GREEN
|
||||
echo "$HOSTNAME" > /mnt/etc/HOSTNAME
|
||||
|
||||
arch-chroot /mnt useradd -mU -s /bin/bash -G wheel,uucp,video,audio,storage,games,input $USER
|
||||
echoc " - Setting shell." $GREEN
|
||||
arch-chroot /mnt chsh -s /bin/bash
|
||||
|
||||
echoc " - Adding Users." $GREEN
|
||||
arch-chroot /mnt useradd -mU -s /bin/bash -G wheel,uucp,video,audio,storage,games,input $USER
|
||||
|
||||
echo "$USER:$PASSWD" | chpasswd -e --root /mnt
|
||||
echo "root:$ROOTPASSWD" | chpasswd -e --root /mnt
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
######################################################################################
|
||||
@ -123,11 +128,28 @@ fi
|
||||
|
||||
echo "AALI - 1.0"
|
||||
|
||||
#run each step and check output for completion
|
||||
prechecks
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Prechecks passed!"
|
||||
partition
|
||||
sysinstall
|
||||
else
|
||||
echoc "Prechecks failed!" $RED
|
||||
return -1
|
||||
fi
|
||||
|
||||
#partition good
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Partitioning complete!"
|
||||
sysinstall
|
||||
else
|
||||
echoc "Partitioning failed." $RED
|
||||
return -1
|
||||
fi
|
||||
|
||||
#sysinstall good
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Base system installation complete!"
|
||||
else
|
||||
echoc "System installation failed!" $RED
|
||||
fi
|
Loading…
Reference in New Issue
Block a user