remove redundant echo flags, fix sed expressions from c58e725
This commit is contained in:
parent
2b3f476692
commit
b07be8b50c
10
archtitus.sh
10
archtitus.sh
|
|
@ -10,7 +10,7 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts
|
SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts
|
||||||
CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs
|
CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs
|
||||||
set +a
|
set +a
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -21,8 +21,7 @@ echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Scripts are in directory named ArchTitus
|
Scripts are in directory named ArchTitus"
|
||||||
"
|
|
||||||
( bash $SCRIPT_DIR/scripts/startup.sh )|& tee startup.log
|
( bash $SCRIPT_DIR/scripts/startup.sh )|& tee startup.log
|
||||||
source $CONFIGS_DIR/setup.conf
|
source $CONFIGS_DIR/setup.conf
|
||||||
( bash $SCRIPT_DIR/scripts/0-preinstall.sh )|& tee 0-preinstall.log
|
( bash $SCRIPT_DIR/scripts/0-preinstall.sh )|& tee 0-preinstall.log
|
||||||
|
|
@ -33,7 +32,7 @@ echo -ne "
|
||||||
( arch-chroot /mnt $HOME/ArchTitus/scripts/3-post-setup.sh )|& tee 3-post-setup.log
|
( arch-chroot /mnt $HOME/ArchTitus/scripts/3-post-setup.sh )|& tee 3-post-setup.log
|
||||||
cp -v *.log /mnt/home/$USERNAME
|
cp -v *.log /mnt/home/$USERNAME
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -44,5 +43,4 @@ echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Done - Please Eject Install Media and Reboot
|
Done - Please Eject Install Media and Reboot"
|
||||||
"
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# @file Preinstall
|
# @file Preinstall
|
||||||
# @brief Contains the steps necessary to configure and pacstrap the install to selected drive.
|
# @brief Contains the steps necessary to configure and pacstrap the install to selected drive.
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -23,8 +23,7 @@ echo -ne "
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
Setting up mirrors for optimal download
|
Setting up mirrors for optimal download"
|
||||||
"
|
|
||||||
source $CONFIGS_DIR/setup.conf
|
source $CONFIGS_DIR/setup.conf
|
||||||
iso=$(curl -4 ifconfig.co/country-iso)
|
iso=$(curl -4 ifconfig.co/country-iso)
|
||||||
timedatectl set-ntp true
|
timedatectl set-ntp true
|
||||||
|
|
@ -34,24 +33,21 @@ setfont ter-v22b
|
||||||
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
|
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
|
||||||
pacman -S --noconfirm --needed reflector rsync grub
|
pacman -S --noconfirm --needed reflector rsync grub
|
||||||
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
|
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Setting up $iso mirrors for faster downloads
|
Setting up $iso mirrors for faster downloads
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
reflector -a 48 -c $iso -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist
|
reflector -a 48 -c $iso -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist
|
||||||
mkdir /mnt &>/dev/null # Hiding error message if any
|
mkdir /mnt &>/dev/null # Hiding error message if any
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Installing Prerequisites
|
Installing Prerequisites
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc
|
pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Formating Disk
|
Formating Disk
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
umount -A --recursive /mnt # make sure everything is unmounted before we start
|
umount -A --recursive /mnt # make sure everything is unmounted before we start
|
||||||
# disk prep
|
# disk prep
|
||||||
sgdisk -Z ${DISK} # zap all on disk
|
sgdisk -Z ${DISK} # zap all on disk
|
||||||
|
|
@ -67,11 +63,10 @@ fi
|
||||||
partprobe ${DISK} # reread partition table to ensure it is correct
|
partprobe ${DISK} # reread partition table to ensure it is correct
|
||||||
|
|
||||||
# make filesystems
|
# make filesystems
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Creating Filesystems
|
Creating Filesystems
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
subvols=(home var tmp .snapshots)
|
subvols=(home var tmp .snapshots)
|
||||||
|
|
||||||
# @description Creates the btrfs subvolumes.
|
# @description Creates the btrfs subvolumes.
|
||||||
|
|
@ -147,11 +142,10 @@ if ! grep -qs '/mnt' /proc/mounts; then
|
||||||
echo "Rebooting in 1 Second ..." && sleep 1
|
echo "Rebooting in 1 Second ..." && sleep 1
|
||||||
reboot now
|
reboot now
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Arch Install on Main Drive
|
Arch Install on Main Drive
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed
|
pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed
|
||||||
echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf
|
echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf
|
||||||
cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus
|
cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus
|
||||||
|
|
@ -162,21 +156,19 @@ echo "
|
||||||
Generated /etc/fstab:
|
Generated /etc/fstab:
|
||||||
"
|
"
|
||||||
cat /mnt/etc/fstab
|
cat /mnt/etc/fstab
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
GRUB BIOS Bootloader Install & Check
|
GRUB BIOS Bootloader Install & Check
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
if [[ ! -d "/sys/firmware/efi" ]]; then
|
if [[ ! -d "/sys/firmware/efi" ]]; then
|
||||||
grub-install --boot-directory=/mnt/boot ${DISK}
|
grub-install --boot-directory=/mnt/boot ${DISK}
|
||||||
else
|
else
|
||||||
pacstrap /mnt efibootmgr --noconfirm --needed
|
pacstrap /mnt efibootmgr --noconfirm --needed
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Checking for low memory systems <8G
|
Checking for low memory systems <8G
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
|
TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
|
||||||
if [[ $TOTAL_MEM -lt 8000000 ]]; then
|
if [[ $TOTAL_MEM -lt 8000000 ]]; then
|
||||||
# Put swap into the actual system, not into RAM disk, otherwise there is no point in it, it'll cache RAM into RAM. So, /mnt/ everything.
|
# Put swap into the actual system, not into RAM disk, otherwise there is no point in it, it'll cache RAM into RAM. So, /mnt/ everything.
|
||||||
|
|
@ -190,8 +182,7 @@ if [[ $TOTAL_MEM -lt 8000000 ]]; then
|
||||||
# The line below is written to /mnt/ but doesn't contain /mnt/, since it's just / for the system itself.
|
# The line below is written to /mnt/ but doesn't contain /mnt/, since it's just / for the system itself.
|
||||||
echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab # Add swap to fstab, so it KEEPS working after installation.
|
echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab # Add swap to fstab, so it KEEPS working after installation.
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
SYSTEM READY FOR 1-setup.sh
|
SYSTEM READY FOR 1-setup.sh
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# @file Setup
|
# @file Setup
|
||||||
# @brief Configures installed system, installs base packages, and creates user.
|
# @brief Configures installed system, installs base packages, and creates user.
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -14,44 +14,39 @@ echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
SCRIPTHOME: ArchTitus
|
SCRIPTHOME: ArchTitus
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
source $HOME/ArchTitus/configs/setup.conf
|
source $HOME/ArchTitus/configs/setup.conf
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Network Setup
|
Network Setup
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
pacman -S --noconfirm --needed networkmanager dhclient
|
pacman -S --noconfirm --needed networkmanager dhclient
|
||||||
systemctl enable --now NetworkManager
|
systemctl enable --now NetworkManager
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Setting up mirrors for optimal download
|
Setting up mirrors for optimal download
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
pacman -S --noconfirm --needed pacman-contrib curl
|
pacman -S --noconfirm --needed pacman-contrib curl
|
||||||
pacman -S --noconfirm --needed reflector rsync grub arch-install-scripts git
|
pacman -S --noconfirm --needed reflector rsync grub arch-install-scripts git
|
||||||
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
|
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
|
||||||
|
|
||||||
nc=$(grep -c ^processor /proc/cpuinfo)
|
nc=$(grep -c ^processor /proc/cpuinfo)
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
You have " $nc" cores. And
|
You have " $nc" cores. And
|
||||||
changing the makeflags for "$nc" cores. Aswell as
|
changing the makeflags for "$nc" cores. Aswell as
|
||||||
changing the compression settings.
|
changing the compression settings.
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
|
TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
|
||||||
if [[ $TOTAL_MEM -gt 8000000 ]]; then
|
if [[ $TOTAL_MEM -gt 8000000 ]]; then
|
||||||
sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf
|
sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf
|
||||||
sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg.conf
|
sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg.conf
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Setup Language to US and set locale
|
Setup Language to US and set locale
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
sed -i 's/en_US.UTF-8 UTF-8/s/^#//' /etc/locale.gen
|
||||||
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
locale-gen
|
locale-gen
|
||||||
timedatectl --no-ask-password set-timezone ${TIMEZONE}
|
timedatectl --no-ask-password set-timezone ${TIMEZONE}
|
||||||
timedatectl --no-ask-password set-ntp 1
|
timedatectl --no-ask-password set-ntp 1
|
||||||
|
|
@ -61,21 +56,20 @@ ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
|
||||||
localectl --no-ask-password set-keymap ${KEYMAP}
|
localectl --no-ask-password set-keymap ${KEYMAP}
|
||||||
|
|
||||||
# Add sudo no password rights
|
# Add sudo no password rights
|
||||||
sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
|
sed -i 's/%wheel ALL=(ALL) NOPASSWD: ALL/s/^# //' /etc/sudoers
|
||||||
sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
|
sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/s/^# //' /etc/sudoers
|
||||||
|
|
||||||
#Add parallel downloading
|
#Add parallel downloading
|
||||||
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
|
sed -i 's/ParallelDownloads/s/^#//' /etc/pacman.conf
|
||||||
|
|
||||||
#Enable multilib
|
#Enable multilib
|
||||||
sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
|
sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
|
||||||
pacman -Sy --noconfirm --needed
|
pacman -Sy --noconfirm --needed
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Installing Base System
|
Installing Base System
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
# sed $INSTALL_TYPE is using install type to check for MINIMAL installation, if it's true, stop
|
# sed $INSTALL_TYPE is using install type to check for MINIMAL installation, if it's true, stop
|
||||||
# stop the script and move on, not installing any more packages below that line
|
# stop the script and move on, not installing any more packages below that line
|
||||||
if [[ ! $DESKTOP_ENV == server ]]; then
|
if [[ ! $DESKTOP_ENV == server ]]; then
|
||||||
|
|
@ -89,11 +83,10 @@ if [[ ! $DESKTOP_ENV == server ]]; then
|
||||||
sudo pacman -S --noconfirm --needed ${line}
|
sudo pacman -S --noconfirm --needed ${line}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Installing Microcode
|
Installing Microcode
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
# determine processor type and install microcode
|
# determine processor type and install microcode
|
||||||
proc_type=$(lscpu)
|
proc_type=$(lscpu)
|
||||||
if grep -E "GenuineIntel" <<< ${proc_type}; then
|
if grep -E "GenuineIntel" <<< ${proc_type}; then
|
||||||
|
|
@ -106,11 +99,10 @@ elif grep -E "AuthenticAMD" <<< ${proc_type}; then
|
||||||
proc_ucode=amd-ucode.img
|
proc_ucode=amd-ucode.img
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Installing Graphics Drivers
|
Installing Graphics Drivers
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
# Graphics Drivers find and install
|
# Graphics Drivers find and install
|
||||||
gpu_type=$(lspci)
|
gpu_type=$(lspci)
|
||||||
if grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then
|
if grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then
|
||||||
|
|
@ -161,11 +153,10 @@ echo "password=${password,,}" >> ${HOME}/ArchTitus/configs/setup.conf
|
||||||
|
|
||||||
echo "NAME_OF_MACHINE=${name_of_machine,,}" >> ${HOME}/ArchTitus/configs/setup.conf
|
echo "NAME_OF_MACHINE=${name_of_machine,,}" >> ${HOME}/ArchTitus/configs/setup.conf
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Adding User
|
Adding User
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
if [ $(whoami) = "root" ]; then
|
if [ $(whoami) = "root" ]; then
|
||||||
groupadd libvirt
|
groupadd libvirt
|
||||||
useradd -m -G wheel,libvirt -s /bin/bash $USERNAME
|
useradd -m -G wheel,libvirt -s /bin/bash $USERNAME
|
||||||
|
|
@ -187,12 +178,11 @@ fi
|
||||||
if [[ ${FS} == "luks" ]]; then
|
if [[ ${FS} == "luks" ]]; then
|
||||||
# Making sure to edit mkinitcpio conf if luks is selected
|
# Making sure to edit mkinitcpio conf if luks is selected
|
||||||
# add encrypt in mkinitcpio.conf before filesystems in hooks
|
# add encrypt in mkinitcpio.conf before filesystems in hooks
|
||||||
sed -i 's/filesystems/encrypt filesystems/g' /etc/mkinitcpio.conf
|
sed -i 's/filesystems/encrypt &/g' /etc/mkinitcpio.conf
|
||||||
# making mkinitcpio with linux kernel
|
# making mkinitcpio with linux kernel
|
||||||
mkinitcpio -p linux
|
mkinitcpio -p linux
|
||||||
fi
|
fi
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
SYSTEM READY FOR 2-user.sh
|
SYSTEM READY FOR 2-user.sh
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# @file User
|
# @file User
|
||||||
# @brief User customizations and AUR package installation.
|
# @brief User customizations and AUR package installation.
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -16,8 +16,7 @@ echo -ne "
|
||||||
SCRIPTHOME: ArchTitus
|
SCRIPTHOME: ArchTitus
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
Installing AUR Softwares
|
Installing AUR Softwares"
|
||||||
"
|
|
||||||
source $HOME/ArchTitus/configs/setup.conf
|
source $HOME/ArchTitus/configs/setup.conf
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
|
@ -74,9 +73,8 @@ if [[ $INSTALL_TYPE == "FULL" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
SYSTEM READY FOR 3-post-setup.sh
|
SYSTEM READY FOR 3-post-setup.sh
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# @file Post-Setup
|
# @file Post-Setup
|
||||||
# @brief Finalizing installation configurations and cleaning up after script.
|
# @brief Finalizing installation configurations and cleaning up after script.
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -17,22 +17,20 @@ echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
Final Setup and Configurations
|
Final Setup and Configurations
|
||||||
GRUB EFI Bootloader Install & Check
|
GRUB EFI Bootloader Install & Check"
|
||||||
"
|
|
||||||
source ${HOME}/ArchTitus/configs/setup.conf
|
source ${HOME}/ArchTitus/configs/setup.conf
|
||||||
|
|
||||||
if [[ -d "/sys/firmware/efi" ]]; then
|
if [[ -d "/sys/firmware/efi" ]]; then
|
||||||
grub-install --efi-directory=/boot ${DISK}
|
grub-install --efi-directory=/boot ${DISK}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Creating (and Theming) Grub Boot Menu
|
Creating (and Theming) Grub Boot Menu
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
# set kernel parameter for decrypting the drive
|
# set kernel parameter for decrypting the drive
|
||||||
if [[ "${FS}" == "luks" ]]; then
|
if [[ "${FS}" == "luks" ]]; then
|
||||||
sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%GRUB_CMDLINE_LINUX_DEFAULT=\"cryptdevice=UUID=${ENCRYPTED_PARTITION_UUID}:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub
|
sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%&cryptdevice=UUID=${ENCRYPTED_PARTITION_UUID}:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub
|
||||||
fi
|
fi
|
||||||
# set kernel parameter for adding splash screen
|
# set kernel parameter for adding splash screen
|
||||||
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub
|
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub
|
||||||
|
|
@ -54,11 +52,10 @@ echo -e "Updating grub..."
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
echo -e "All set!"
|
echo -e "All set!"
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Enabling (and Theming) Login Display Manager
|
Enabling (and Theming) Login Display Manager
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
if [[ ${DESKTOP_ENV} == "kde" ]]; then
|
if [[ ${DESKTOP_ENV} == "kde" ]]; then
|
||||||
systemctl enable sddm.service
|
systemctl enable sddm.service
|
||||||
if [[ ${INSTALL_TYPE} == "FULL" ]]; then
|
if [[ ${INSTALL_TYPE} == "FULL" ]]; then
|
||||||
|
|
@ -88,11 +85,10 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Enabling Essential Services
|
Enabling Essential Services
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
systemctl enable cups.service
|
systemctl enable cups.service
|
||||||
echo " Cups enabled"
|
echo " Cups enabled"
|
||||||
ntpd -qg
|
ntpd -qg
|
||||||
|
|
@ -110,11 +106,10 @@ systemctl enable avahi-daemon.service
|
||||||
echo " Avahi enabled"
|
echo " Avahi enabled"
|
||||||
|
|
||||||
if [[ "${FS}" == "luks" || "${FS}" == "btrfs" ]]; then
|
if [[ "${FS}" == "luks" || "${FS}" == "btrfs" ]]; then
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Creating Snapper Config
|
Creating Snapper Config
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
|
|
||||||
SNAPPER_CONF="$HOME/ArchTitus/configs/etc/snapper/configs/root"
|
SNAPPER_CONF="$HOME/ArchTitus/configs/etc/snapper/configs/root"
|
||||||
mkdir -p /etc/snapper/configs/
|
mkdir -p /etc/snapper/configs/
|
||||||
|
|
@ -126,11 +121,10 @@ cp -rfv ${SNAPPER_CONF_D} /etc/conf.d/
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Enabling (and Theming) Plymouth Boot Splash
|
Enabling (and Theming) Plymouth Boot Splash
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
PLYMOUTH_THEMES_DIR="$HOME/ArchTitus/configs/usr/share/plymouth/themes"
|
PLYMOUTH_THEMES_DIR="$HOME/ArchTitus/configs/usr/share/plymouth/themes"
|
||||||
PLYMOUTH_THEME="arch-glow" # can grab from config later if we allow selection
|
PLYMOUTH_THEME="arch-glow" # can grab from config later if we allow selection
|
||||||
mkdir -p /usr/share/plymouth/themes
|
mkdir -p /usr/share/plymouth/themes
|
||||||
|
|
@ -145,17 +139,16 @@ fi
|
||||||
plymouth-set-default-theme -R arch-glow # sets the theme and runs mkinitcpio
|
plymouth-set-default-theme -R arch-glow # sets the theme and runs mkinitcpio
|
||||||
echo 'Plymouth theme installed'
|
echo 'Plymouth theme installed'
|
||||||
|
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Cleaning
|
Cleaning
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
# Remove no password sudo rights
|
# Remove no password sudo rights
|
||||||
sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# &/' /etc/sudoers
|
sed -i 's/%wheel ALL=(ALL) NOPASSWD: ALL/# &/' /etc/sudoers
|
||||||
sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# &/' /etc/sudoers
|
sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# &/' /etc/sudoers
|
||||||
# Add sudo rights
|
# Add sudo rights
|
||||||
sed -i '/^# %wheel ALL=(ALL) ALL/s/^# //' /etc/sudoers
|
sed -i '/%wheel ALL=(ALL) ALL/s/^# //' /etc/sudoers
|
||||||
sed -i '/^# %wheel ALL=(ALL:ALL) ALL/s/^# //' /etc/sudoers
|
sed -i '/%wheel ALL=(ALL:ALL) ALL/s/^# //' /etc/sudoers
|
||||||
|
|
||||||
rm -r $HOME/ArchTitus
|
rm -r $HOME/ArchTitus
|
||||||
rm -r /home/$USERNAME/ArchTitus
|
rm -r /home/$USERNAME/ArchTitus
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue