From fdbe51d78cb3ebcc1a1fcdaadfdbfdb84dedf0cb Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan <159180023+sarathrajsrinivasan@users.noreply.github.com> Date: Wed, 2 Oct 2024 07:38:03 -0700 Subject: [PATCH] [macOS] Fix automationmodetool and loginwindow issue for macOS14.7 (#10684) --- .../scripts/build/configure-autologin.sh | 1 + .../macos/scripts/build/configure-machine.sh | 33 ++++++++++--------- .../macos/scripts/build/configure-system.sh | 3 ++ images/macos/templates/macOS-13.anka.pkr.hcl | 1 + .../templates/macOS-13.arm64.anka.pkr.hcl | 1 + images/macos/templates/macOS-14.anka.pkr.hcl | 1 + .../templates/macOS-14.arm64.anka.pkr.hcl | 1 + images/macos/templates/macOS-15.anka.pkr.hcl | 2 ++ .../templates/macOS-15.arm64.anka.pkr.hcl | 1 + 9 files changed, 29 insertions(+), 15 deletions(-) diff --git a/images/macos/scripts/build/configure-autologin.sh b/images/macos/scripts/build/configure-autologin.sh index 16bdc9242..004717490 100644 --- a/images/macos/scripts/build/configure-autologin.sh +++ b/images/macos/scripts/build/configure-autologin.sh @@ -9,6 +9,7 @@ echo "Enabling automatic GUI login for the '$USERNAME' user.." python3 $HOME/bootstrap/kcpassword.py "$PASSWORD" /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser "$USERNAME" +/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserScreenLocked -bool false : ' The MIT License (MIT) diff --git a/images/macos/scripts/build/configure-machine.sh b/images/macos/scripts/build/configure-machine.sh index 438587fe9..abd1f9872 100644 --- a/images/macos/scripts/build/configure-machine.sh +++ b/images/macos/scripts/build/configure-machine.sh @@ -50,21 +50,18 @@ done rm -f ./add-certificate # enable-automationmode-without-authentication - +brew install expect retry=10 while [[ $retry -gt 0 ]]; do { -osascript <