diff --git a/archtitus.sh b/archtitus.sh index 5b2f6d9..3f02439 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -20,7 +20,7 @@ echo -ne " Scripts are in directory named ArchTitus " ( bash $SCRIPT_DIR/scripts/startup.sh )|& tee startup.log - source $SCRIPT_DIR/configs/setup.conf + 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 if [[ ! $DESKTOP_ENV == server ]]; then diff --git a/scripts/0-preinstall.sh b/scripts/0-preinstall.sh index dd8920f..73ec1cc 100755 --- a/scripts/0-preinstall.sh +++ b/scripts/0-preinstall.sh @@ -122,7 +122,7 @@ elif [[ "${FS}" == "luks" ]]; then mount -t btrfs ${partition3} /mnt subvolumesetup # store uuid of encrypted partition for grub - echo ENCRYPTED_PARTITION_UUID=$(blkid -s UUID -o value ${partition3}) >> $CONFIG_DIR/setup.conf + echo ENCRYPTED_PARTITION_UUID=$(blkid -s UUID -o value ${partition3}) >> $CONFIGS_DIR/setup.conf fi # mount target diff --git a/scripts/3-post-setup.sh b/scripts/3-post-setup.sh index 7782ef2..fd13afb 100755 --- a/scripts/3-post-setup.sh +++ b/scripts/3-post-setup.sh @@ -15,9 +15,13 @@ echo -ne " Final Setup and Configurations GRUB EFI Bootloader Install & Check " -source /root/ArchTitus/configs/setup.conf +source ${HOME}/ArchTitus/configs/setup.conf genfstab -U -p / >> /etc/fstab +echo " + Generated /etc/fstab: +" cat /etc/fstab + if [[ -d "/sys/firmware/efi" ]]; then grub-install --efi-directory=/boot ${DISK} fi @@ -83,12 +87,18 @@ echo -ne " ------------------------------------------------------------------------- " systemctl enable cups.service +echo " Cups enabled" ntpd -qg systemctl enable ntpd.service +echo " NTP enabled" systemctl disable dhcpcd.service +echo " DHCP disabled" systemctl stop dhcpcd.service +echo " DHCP stopped" systemctl enable NetworkManager.service +echo " NetworkManager enabled" systemctl enable bluetooth +echo " Bluetooth enabled" if [[ "${FS}" == "luks" || "${FS}" == "btrfs" ]]; then echo -ne " @@ -97,11 +107,13 @@ echo -ne " ------------------------------------------------------------------------- " -SNAPPER_CONF="/root/ArchTitus/configs/etc/snapper/configs/root" -SNAPPER_CONF_D="/root/ArchTitus/configs/etc/conf.d/snapper" +SNAPPER_CONF="${HOME}/ArchTitus/configs/etc/snapper/configs/root" +SNAPPER_CONF_D="${HOME}/ArchTitus/configs/etc/conf.d/snapper" -cp -a ${SNAPPER_CONF} /home/$USERNAME/etc/snapper/configs/ -cp -a ${SNAPPER_CONF_D} /home/$USERNAME/etc/conf.d/ +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/ fi @@ -117,6 +129,8 @@ 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/ + rm -r /root/ArchTitus rm -r /home/$USERNAME/ArchTitus