From a2b00058a218b3e4a42dd5466bb054099d87fee3 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 17 Feb 2022 23:08:50 -0600 Subject: [PATCH] fix misc errors from logs Remove iptables-nft conflict Include glibc in prereqs to prevent issues with outdated isos --- archtitus.sh | 4 ++-- pkg-files/pacman-pkgs.txt | 3 +-- scripts/0-preinstall.sh | 3 ++- scripts/1-setup.sh | 13 +++++++++---- scripts/2-user.sh | 4 ++-- scripts/3-post-setup.sh | 16 ++++++++-------- 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/archtitus.sh b/archtitus.sh index 3f02439..dc6f7b4 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -22,11 +22,11 @@ echo -ne " ( bash $SCRIPT_DIR/scripts/startup.sh )|& tee startup.log source $CONFIGS_DIR/setup.conf ( bash $SCRIPT_DIR/scripts/0-preinstall.sh )|& tee 0-preinstall.log - ( arch-chroot /mnt /root/ArchTitus/scripts/1-setup.sh )|& tee 1-setup.log + ( arch-chroot /mnt $HOME/ArchTitus/scripts/1-setup.sh )|& tee 1-setup.log if [[ ! $DESKTOP_ENV == server ]]; then ( arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/scripts/2-user.sh )|& tee 2-user.log fi - ( arch-chroot /mnt /root/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 echo -ne " ------------------------------------------------------------------------- diff --git a/pkg-files/pacman-pkgs.txt b/pkg-files/pacman-pkgs.txt index 8634b6a..636c9e4 100644 --- a/pkg-files/pacman-pkgs.txt +++ b/pkg-files/pacman-pkgs.txt @@ -8,7 +8,6 @@ xorg-xinit xterm binutils dosfstools -iptables-nft linux-headers noto-fonts-emoji usbutils @@ -81,7 +80,7 @@ python-psutil python-pyqt5 python-pip qemu -snap-pack +snap-pac snapper steam swtpm diff --git a/scripts/0-preinstall.sh b/scripts/0-preinstall.sh index 73ec1cc..417734d 100755 --- a/scripts/0-preinstall.sh +++ b/scripts/0-preinstall.sh @@ -25,6 +25,7 @@ Setting up mirrors for optimal download source $CONFIGS_DIR/setup.conf iso=$(curl -4 ifconfig.co/country-iso) timedatectl set-ntp true +pacman -S --noconfirm archlinux-keyring #update keyrings to latest to prevent packages failing to install pacman -S --noconfirm --needed pacman-contrib terminus-font setfont ter-v22b sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf @@ -42,7 +43,7 @@ echo -ne " Installing Prerequisites ------------------------------------------------------------------------- " -pacman -S --noconfirm --needed gptfdisk btrfs-progs +pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc echo -ne " ------------------------------------------------------------------------- Formating Disk diff --git a/scripts/1-setup.sh b/scripts/1-setup.sh index a8c4ae0..9f0e1ad 100755 --- a/scripts/1-setup.sh +++ b/scripts/1-setup.sh @@ -12,7 +12,7 @@ echo -ne " SCRIPTHOME: ArchTitus ------------------------------------------------------------------------- " -source /root/ArchTitus/configs/setup.conf +source $HOME/ArchTitus/configs/setup.conf echo -ne " ------------------------------------------------------------------------- Network Setup @@ -75,7 +75,7 @@ echo -ne " # 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 if [[ ! $DESKTOP_ENV == server ]]; then - sed -n '/'$INSTALL_TYPE'/q;p' /root/ArchTitus/pkg-files/pacman-pkgs.txt | while read line + sed -n '/'$INSTALL_TYPE'/q;p' $HOME/ArchTitus/pkg-files/pacman-pkgs.txt | while read line do if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]; then # If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line @@ -120,7 +120,7 @@ elif grep -E "Intel Corporation UHD" <<< ${gpu_type}; then pacman -S --needed --noconfirm libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa fi #SETUP IS WRONG THIS IS RUN -if ! source /root/ArchTitus/configs/setup.conf; then +if ! source $HOME/ArchTitus/configs/setup.conf; then # Loop through user input until the user gives a valid username while true do @@ -167,11 +167,16 @@ echo -ne " if [ $(whoami) = "root" ]; then groupadd libvirt useradd -m -G wheel,libvirt -s /bin/bash $USERNAME + echo "$USERNAME created, home directory created, added to wheel and libvirt group, default shell set to /bin/bash" # use chpasswd to enter $USERNAME:$password echo "$USERNAME:$PASSWORD" | chpasswd - cp -R /root/ArchTitus /home/$USERNAME/ + echo "$USERNAME password set" + + cp -R $HOME/ArchTitus /home/$USERNAME/ chown -R $USERNAME: /home/$USERNAME/ArchTitus + echo "ArchTitus copied to home directory" + # enter $NAME_OF_MACHINE to /etc/hostname echo $NAME_OF_MACHINE > /etc/hostname else diff --git a/scripts/2-user.sh b/scripts/2-user.sh index ddb8085..b1b2c43 100755 --- a/scripts/2-user.sh +++ b/scripts/2-user.sh @@ -14,11 +14,11 @@ echo -ne " Installing AUR Softwares " -# You can solve users running this script as root with this and then doing the same for the next for statement. However I will leave this up to you. source $HOME/ArchTitus/configs/setup.conf cd ~ - touch "~/.cache/zshhistory" + mkdir "/home/$USERNAME/.cache" + touch "/home/$USERNAME/.cache/zshhistory" git clone "https://github.com/ChrisTitusTech/zsh" git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k ln -s "~/zsh/.zshrc" ~/.zshrc diff --git a/scripts/3-post-setup.sh b/scripts/3-post-setup.sh index fd13afb..b718bea 100755 --- a/scripts/3-post-setup.sh +++ b/scripts/3-post-setup.sh @@ -107,13 +107,13 @@ echo -ne " ------------------------------------------------------------------------- " -SNAPPER_CONF="${HOME}/ArchTitus/configs/etc/snapper/configs/root" -SNAPPER_CONF_D="${HOME}/ArchTitus/configs/etc/conf.d/snapper" +SNAPPER_CONF="$HOME/ArchTitus/configs/etc/snapper/configs/root" +mkdir -p /etc/snapper/configs/ +cp -rfv ${SNAPPER_CONF} /etc/snapper/configs/ -mkdir -p /home/$USERNAME/etc/snapper/configs/ -mkdir -p /home/$USERNAME/etc/conf.d/ -cp --verbose -af ${SNAPPER_CONF} /home/$USERNAME/etc/snapper/configs/ -cp --verbose -af ${SNAPPER_CONF_D} /home/$USERNAME/etc/conf.d/ +SNAPPER_CONF_D="$HOME/ArchTitus/configs/etc/conf.d/snapper" +mkdir -p /etc/conf.d/ +cp -rfv ${SNAPPER_CONF_D} /etc/conf.d/ fi @@ -129,9 +129,9 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -cp --verbose -a ${HOME}/ArchTitus/*.log /home/$USERNAME/ +cp -rfv $HOME/ArchTitus/*.log /home/$USERNAME/ -rm -r /root/ArchTitus +rm -r $HOME/ArchTitus rm -r /home/$USERNAME/ArchTitus # Replace in the same state