fix: Fail when domain membership cannot be applied (#2044)

This commit is contained in:
Kroese
2026-08-04 14:03:35 +02:00
committed by GitHub
parent 28792f32a1
commit 379867370a
+4 -6
View File
@@ -1645,12 +1645,9 @@ updateMembership() {
if [ -n "$domain" ]; then if [ -n "$domain" ]; then
# Domain customization is optional: if the template cannot be transformed,
# retain its local-account path and allow installation to continue.
if ! updateDomain "$asset" "$domain" "$account" "$auth" "$PASSWORD" "${DOMAIN_OU:-}"; then if ! updateDomain "$asset" "$domain" "$account" "$auth" "$PASSWORD" "${DOMAIN_OU:-}"; then
error "Failed to add domain configuration to answer file!"
warn "failed to add domain configuration to answer file!" return 1
return 0
fi fi
removeLocalAccount "$asset" || return 1 removeLocalAccount "$asset" || return 1
@@ -1660,7 +1657,8 @@ updateMembership() {
[ -n "$workgroup" ] || return 0 [ -n "$workgroup" ] || return 0
if ! updateWorkgroup "$asset" "$workgroup"; then if ! updateWorkgroup "$asset" "$workgroup"; then
warn "failed to add workgroup configuration to answer file!" error "Failed to add workgroup configuration to answer file!"
return 1
fi fi
return 0 return 0