Merge remote-tracking branch 'origin/main' into integrate/pr13

This commit is contained in:
2026-10-30 11:13:55 -03:00
48 changed files with 1361 additions and 343 deletions
+26 -2
View File
@@ -1,6 +1,29 @@
PB=/usr/libexec/PlistBuddy
PB="${PB:-/usr/libexec/PlistBuddy}"
_restore_rosetta_hosts() {
local hosts="$1" tmp_hosts
tmp_hosts=$(mktemp "${hosts}.XXXXXX") || return 1
if ! cp -p "$hosts" "$tmp_hosts" || ! awk '
$0=="# Added by unleash — DEP enrollment block" { owned=1; print; next }
owned && /^(0[.]0[.]0[.]0|::)[[:space:]]+configuration[.]apple[.]com[[:space:]]*$/ { next }
owned && $0 !~ /^(0[.]0[.]0[.]0|::)[[:space:]]+[[:alnum:]_.-]+[[:space:]]*$/ { owned=0 }
{ print }
' "$hosts" > "$tmp_hosts"; then
rm -f "$tmp_hosts"
return 1
fi
if cmp -s "$hosts" "$tmp_hosts"; then
rm -f "$tmp_hosts"
return 0
fi
if [ ! -e "$hosts.unleash-rosetta.bak" ]; then
cp -p "$hosts" "$hosts.unleash-rosetta.bak" || { rm -f "$tmp_hosts"; return 1; }
fi
mv "$tmp_hosts" "$hosts" || { rm -f "$tmp_hosts"; return 1; }
info "Removed old Unleash Rosetta blocks; backup: $hosts.unleash-rosetta.bak"
}
suppress_enrollment() {
local data_mount="$1"
@@ -35,6 +58,7 @@ suppress_enrollment() {
step "Blocking enrollment domains (Data volume hosts)..."
[ -f "$hosts" ] || { mkdir -p "$(dirname "$hosts")"; touch "$hosts"; }
_restore_rosetta_hosts "$hosts" || error_exit "Could not repair old Rosetta hosts blocks."
grep -q "Added by unleash" "$hosts" 2>/dev/null || {
echo "" >>"$hosts"
echo "# Added by unleash — DEP enrollment block" >>"$hosts"
@@ -50,7 +74,6 @@ suppress_enrollment() {
gdmf.apple.com
ax.init-content.apple.com
init-content.apple.com
configuration.apple.com
xp.apple.com
gs.apple.com
tb.apple.com
@@ -203,6 +226,7 @@ full_bypass_mode() {
echo ""
step "Creating temporary admin account"
local realName
prompt_default realName "Full name" "Apple"
local username