From a72da2d292fe39067510e4ae9cbc5f3f4eb99bf7 Mon Sep 17 00:00:00 2001 From: fenris Date: Thu, 9 Dec 2021 20:06:56 +0100 Subject: [PATCH] set scripthome manually --- 1-setup.sh | 3 +-- 2-user.sh | 2 +- 3-post-setup.sh | 4 +--- archtitus.sh | 7 +++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/1-setup.sh b/1-setup.sh index 308f463..6c40300 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -9,9 +9,9 @@ echo -ne " ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ------------------------------------------------------------------------- Automated Arch Linux Installer + SCRIPTHOME: $SCRIPTHOME ------------------------------------------------------------------------- " -source /root/installscripthome.conf source $SCRIPTHOME/setup.conf echo -ne " ------------------------------------------------------------------------- @@ -114,7 +114,6 @@ 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 57fd82c..14b62a2 100755 --- a/2-user.sh +++ b/2-user.sh @@ -9,12 +9,12 @@ echo -ne " ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ------------------------------------------------------------------------- Automated Arch Linux Installer + SCRIPTHOME: $SCRIPTHOME ------------------------------------------------------------------------- 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 9368a9f..182de40 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -9,12 +9,12 @@ echo -ne " ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ------------------------------------------------------------------------- Automated Arch Linux Installer + SCRIPTHOME: $SCRIPTHOME ------------------------------------------------------------------------- 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} @@ -60,9 +60,7 @@ sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /et 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 dfc5639..3f748b9 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -18,10 +18,9 @@ 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 + SCRIPTHOME=$SCRIPTHOME arch-chroot /mnt /root/$SCRIPTHOME/1-setup.sh + SCRIPTHOME=$SCRIPTHOME arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$SCRIPTHOME/2-user.sh + SCRIPTHOME=$SCRIPTHOME arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh echo -ne " -------------------------------------------------------------------------