installer: require target user for system finalizer

This commit is contained in:
Ryan Hughes committed 2026-06-04 18:35:01 -04:00
1 parent 67c401c125
commit bf14f69017
7 files changed
+19 -10

No files matched your search

+10
View File
@@ -23,4 +23,14 @@ if (( EUID != 0 )); then
exit 1
fi
if [[ -z ${OMARCHY_INSTALL_USER:-} || ${OMARCHY_INSTALL_USER:-} == "root" ]]; then
echo "Error: system-finalize.sh requires OMARCHY_INSTALL_USER to name the target non-root user" >&2
exit 1
fi
if ! getent passwd "$OMARCHY_INSTALL_USER" >/dev/null; then
echo "Error: OMARCHY_INSTALL_USER=$OMARCHY_INSTALL_USER does not exist" >&2
exit 1
fi
source "$OMARCHY_INSTALL/system/all.sh"