diff --git a/1-setup.sh b/1-setup.sh index 1cb2c48..308f463 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -11,6 +11,7 @@ echo -ne " Automated Arch Linux Installer ------------------------------------------------------------------------- " +source /root/installscripthome.conf source $SCRIPTHOME/setup.conf echo -ne " ------------------------------------------------------------------------- @@ -113,6 +114,7 @@ if [ $(whoami) = "root" ]; then # use chpasswd to enter $username:$password echo "$username:$password" | chpasswd cp -R /root/$SCRIPTHOME /home/$username/ + cp /root/installscripthome.conf /home/$username/installscripthome.conf chown -R $username: /home/$username/$SCRIPTHOME # enter $hostname to /etc/hostname echo $hostname > /etc/hostname diff --git a/2-user.sh b/2-user.sh index a749a8c..57fd82c 100755 --- a/2-user.sh +++ b/2-user.sh @@ -14,6 +14,7 @@ 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 installscripthome.conf source $SCRIPTHOME/setup.conf cd ~ diff --git a/3-post-setup.sh b/3-post-setup.sh index 3d37714..9368a9f 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -14,6 +14,7 @@ echo -ne " Final Setup and Configurations GRUB EFI Bootloader Install & Check " +source /root/installscripthome.conf source $SCRIPTHOME/setup.conf if [[ -d "/sys/firmware/efi" ]]; then grub-install --efi-directory=/boot ${DISK} @@ -58,5 +59,10 @@ sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /et # Add sudo rights sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers +rm -r /root/$SCRIPTHOME +rm -r /root/installscripthome.conf +rm -r /home/$username/$SCRIPTHOME +rm -r /home/$username/installscripthome.conf + # Replace in the same state cd $pwd diff --git a/archtitus.sh b/archtitus.sh index 59d562c..dfc5639 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -18,6 +18,7 @@ echo -ne " bash startup.sh source setup.conf bash 0-preinstall.sh + echo "SCRIPTHOME=$SCRIPTHOME" >> /mnt/root/installscripthome.conf arch-chroot /mnt /root/$SCRIPTHOME/1-setup.sh arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$SCRIPTHOME/2-user.sh arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh