Update after.sh
This commit is contained in:
parent
fd328f4091
commit
69bdc67610
1 changed files with 2 additions and 5 deletions
7
after.sh
7
after.sh
|
|
@ -6,11 +6,8 @@ set -e
|
||||||
|
|
||||||
# Detect the normal user created by archinstall
|
# Detect the normal user created by archinstall
|
||||||
USERNAME=$(awk -F: '$3 >= 1000 && $3 < 60000 && $6 ~ /^\/home\// {print $1; exit}' /etc/passwd)
|
USERNAME=$(awk -F: '$3 >= 1000 && $3 < 60000 && $6 ~ /^\/home\// {print $1; exit}' /etc/passwd)
|
||||||
|
# Error in case there is no normal user created
|
||||||
if ! id "$USERNAME" &>/dev/null; then
|
[[ -z "$USERNAME" ]] && { echo "Error: Could not detect the normal user."; exit 1; }
|
||||||
echo "Error: user '$USERNAME' does not exist."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
USER_HOME="/home/$USERNAME"
|
USER_HOME="/home/$USERNAME"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue