diff --git a/scripts/Arch/Config/sudo/install.sh b/scripts/Arch/Config/sudo/install.sh new file mode 100644 index 000000000..0cde4a289 --- /dev/null +++ b/scripts/Arch/Config/sudo/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [ ! "$UID" -eq 0 ] +then + sudo bash "$BASH_SOURCE"; +else + sed -i "s/^# \(%wheel \)/\1/" /etc/sudoers; +fi; diff --git a/scripts/Arch/OS/setup.sh b/scripts/Arch/OS/setup.sh index 1bbab9834..fb07bdc6d 100755 --- a/scripts/Arch/OS/setup.sh +++ b/scripts/Arch/OS/setup.sh @@ -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" bash "$tempDir/../Software/GRUB/install.sh"; +arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/../Software/sudo/install.sh"; USER_NAME="${USER_NAME}" \ diff --git a/scripts/Arch/Software/sudo/install.sh b/scripts/Arch/Software/sudo/install.sh new file mode 100644 index 000000000..e4c31b200 --- /dev/null +++ b/scripts/Arch/Software/sudo/install.sh @@ -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;