Install sudo during setup

This commit is contained in:
Manuel Thalmann 2023-04-03 11:00:11 +02:00
parent a970ec3915
commit fbc68caf34
3 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,7 @@
#!/bin/bash
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
else
sed -i "s/^# \(%wheel \)/\1/" /etc/sudoers;
fi;

View file

@ -38,6 +38,7 @@ arch-chroot "$ARCH_MOUNT_ROOT" echo "$ARCH_HOSTNAME" > /etc/hostname;
arch-chroot "$ARCH_MOUNT_ROOT" mkinitcpio -P; arch-chroot "$ARCH_MOUNT_ROOT" mkinitcpio -P;
arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/../Software/GRUB/install.sh"; arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/../Software/GRUB/install.sh";
arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/../Software/sudo/install.sh";
USER_NAME="${USER_NAME}" \ USER_NAME="${USER_NAME}" \

View file

@ -0,0 +1,9 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
else
pacman --noconfirm -Syu sudo;
source "../../Config/sudo/install.sh";
fi;