V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m1s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-09-16 17:21:09 +02:00
parent c160bac0e2
commit 2fd736ec79

View File

@@ -894,10 +894,9 @@ pwline="$(getent passwd "${user}" || true)"
[[ -n "${pwline}" ]] || { echo "User not found: ${user}" >&2; exit 1; } [[ -n "${pwline}" ]] || { echo "User not found: ${user}" >&2; exit 1; }
IFS=: read -r _ _ uid gid _ home _ <<<"${pwline}" IFS=: read -r _ _ uid gid _ home _ <<<"${pwline}"
### Execute as user (login shell to get proper env), then clean up the temp script.
if [[ "${uid}" -eq 0 ]]; then if [[ "${uid}" -eq 0 ]]; then
### root user: no su needed ### root user: no su needed
/bin/bash -s <<'USR' /bin/bash -s <<'ZSHROOT'
#!/bin/bash #!/bin/bash
set -Ceuo pipefail set -Ceuo pipefail
export LC_ALL=C export LC_ALL=C
@@ -939,12 +938,12 @@ mkdir -p "${ZSH_CUSTOM}/plugins"
### Do NOT start zsh here and do NOT chsh (RUNZSH/CHSH handled above). ### Do NOT start zsh here and do NOT chsh (RUNZSH/CHSH handled above).
: :
USR ZSHROOT
### ---------------------------------------------------------------------------------------------------------------------------- ### ----------------------------------------------------------------------------------------------------------------------------
else else
su - "${user}" -s /bin/bash <<'USR' su - "${user}" -s /bin/bash <<'ZSHUSER'
#!/bin/bash #!/bin/bash
set -Ceuo pipefail set -Ceuo pipefail
export LC_ALL=C export LC_ALL=C
@@ -986,7 +985,7 @@ mkdir -p "${ZSH_CUSTOM}/plugins"
### Do NOT start zsh here and do NOT chsh (RUNZSH/CHSH handled above). ### Do NOT start zsh here and do NOT chsh (RUNZSH/CHSH handled above).
: :
USR ZSHUSER
### ---------------------------------------------------------------------------------------------------------------------------- ### ----------------------------------------------------------------------------------------------------------------------------
fi fi