set and source scripthome
This commit is contained in:
parent
1b81bef254
commit
c8628e395c
|
|
@ -11,6 +11,7 @@ echo -ne "
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
|
source /root/installscripthome.conf
|
||||||
source $SCRIPTHOME/setup.conf
|
source $SCRIPTHOME/setup.conf
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
@ -113,6 +114,7 @@ if [ $(whoami) = "root" ]; then
|
||||||
# use chpasswd to enter $username:$password
|
# use chpasswd to enter $username:$password
|
||||||
echo "$username:$password" | chpasswd
|
echo "$username:$password" | chpasswd
|
||||||
cp -R /root/$SCRIPTHOME /home/$username/
|
cp -R /root/$SCRIPTHOME /home/$username/
|
||||||
|
cp /root/installscripthome.conf /home/$username/installscripthome.conf
|
||||||
chown -R $username: /home/$username/$SCRIPTHOME
|
chown -R $username: /home/$username/$SCRIPTHOME
|
||||||
# enter $hostname to /etc/hostname
|
# enter $hostname to /etc/hostname
|
||||||
echo $hostname > /etc/hostname
|
echo $hostname > /etc/hostname
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ echo -ne "
|
||||||
Installing AUR Softwares
|
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.
|
# 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
|
source $SCRIPTHOME/setup.conf
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ echo -ne "
|
||||||
Final Setup and Configurations
|
Final Setup and Configurations
|
||||||
GRUB EFI Bootloader Install & Check
|
GRUB EFI Bootloader Install & Check
|
||||||
"
|
"
|
||||||
|
source /root/installscripthome.conf
|
||||||
source $SCRIPTHOME/setup.conf
|
source $SCRIPTHOME/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}
|
||||||
|
|
@ -58,5 +59,10 @@ sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /et
|
||||||
# Add sudo rights
|
# Add sudo rights
|
||||||
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
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
|
# Replace in the same state
|
||||||
cd $pwd
|
cd $pwd
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ echo -ne "
|
||||||
bash startup.sh
|
bash startup.sh
|
||||||
source setup.conf
|
source setup.conf
|
||||||
bash 0-preinstall.sh
|
bash 0-preinstall.sh
|
||||||
|
echo "SCRIPTHOME=$SCRIPTHOME" >> /mnt/root/installscripthome.conf
|
||||||
arch-chroot /mnt /root/$SCRIPTHOME/1-setup.sh
|
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 /usr/bin/runuser -u $username -- /home/$username/$SCRIPTHOME/2-user.sh
|
||||||
arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh
|
arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue