Install sudo during setup
This commit is contained in:
parent
a970ec3915
commit
fbc68caf34
3 changed files with 17 additions and 0 deletions
7
scripts/Arch/Config/sudo/install.sh
Normal file
7
scripts/Arch/Config/sudo/install.sh
Normal 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;
|
|
@ -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}" \
|
||||||
|
|
9
scripts/Arch/Software/sudo/install.sh
Normal file
9
scripts/Arch/Software/sudo/install.sh
Normal 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;
|
Loading…
Reference in a new issue