From 69bdc67610bf680f56593753d931e284ac664455 Mon Sep 17 00:00:00 2001 From: Baltrust Date: Tue, 13 Oct 2026 20:46:42 +0300 Subject: [PATCH] Update after.sh --- after.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/after.sh b/after.sh index 4e5bafc..da2cd7f 100644 --- a/after.sh +++ b/after.sh @@ -6,11 +6,8 @@ set -e # 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 - echo "Error: user '$USERNAME' does not exist." - exit 1 -fi +# Error in case there is no normal user created +[[ -z "$USERNAME" ]] && { echo "Error: Could not detect the normal user."; exit 1; } USER_HOME="/home/$USERNAME"