Update after.sh
This commit is contained in:
parent
b1adf6935e
commit
ba140c36ba
1 changed files with 4 additions and 1 deletions
5
after.sh
5
after.sh
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
read -rp "Enter your username: " USERNAME
|
#read -rp "Enter your username: " USERNAME
|
||||||
|
|
||||||
|
# Detect the normal user created by archinstall
|
||||||
|
USERNAME=$(awk -F: '$3 >= 1000 && $3 < 60000 && $6 ~ /^\/home\// {print $1; exit}' /etc/passwd)
|
||||||
|
|
||||||
if ! id "$USERNAME" &>/dev/null; then
|
if ! id "$USERNAME" &>/dev/null; then
|
||||||
echo "Error: user '$USERNAME' does not exist."
|
echo "Error: user '$USERNAME' does not exist."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue