Only add salt if he doesn't exist

This commit is contained in:
Salt 2020-12-04 01:45:31 -06:00
parent 26baf4a1fa
commit 99fbab1ee8
1 changed files with 4 additions and 2 deletions

View File

@ -243,8 +243,10 @@ build-gentoo-chroot() {
chmod 0700 /boot/efi
# Configure a new user, add him to sudoers
useradd salt -m -G wheel -s /bin/bash -u 1000 -U
passwd salt
if ! id salt > /dev/null 2>&1; then
useradd salt -m -G wheel -s /bin/bash -u 1000 -U
passwd salt
fi
# We've made it this far and now the user has to do just a liiiiiitle bit of configuration
clear