Closed mrmte closed 7 months ago
Greetings, @mrmte!
completionActionOption
are you using?Please see: 5. Troubleshooting > 6. Various Restart Completion Actions not Working as Expected
Also, if you disable debugMode
and use the following snippet from 1. Welcome dialog doesn’t display, does the Mac restart?
timestamp=$( date '+%Y-%m-%d-%H%M%S' ) ; curl -o ~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash https://raw.githubusercontent.com/dan-snelson/Setup-Your-Mac/main/Setup-Your-Mac-via-Dialog.bash ; sudo bash ~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash
(You're invited to join us on Slack.)
\\ 2023-12-07 14:40:40 - SETUP YOUR MAC DIALOG: title: Tim‘s MacBook Pro is ready! 2023-12-07 14:40:40 - SETUP YOUR MAC DIALOG: icon: SF=checkmark.circle.fill,weight=bold,colour1=#00ff44,colour2=#075c1e 2023-12-07 14:40:40 - SETUP YOUR MAC DIALOG: progresstext: Complete! Please restart and enjoy your new MacBook Pro, Tim! 2023-12-07 14:40:40 - SETUP YOUR MAC DIALOG: progress: complete 2023-12-07 14:40:40 - SETUP YOUR MAC DIALOG: button1text: Restart 2023-12-07 14:40:40 - SETUP YOUR MAC DIALOG: button1: enable 2023-12-07 14:40:40 - QUIT SCRIPT: Exiting … 2023-12-07 14:40:40 - QUIT SCRIPT: De-caffeinate … 2023-12-07 14:40:40 - Attempting to terminate the 'caffeinate' process … 2023-12-07 14:40:40 - (Termination message indicates success.) 2023-12-07 14:40:40 - QUIT SCRIPT: Removing /var/tmp/dialogCommandFileWelcome.XCc … 2023-12-07 14:40:40 - QUIT SCRIPT: Removing /var/tmp/dialogCommandFileSetupYourMac.Hkc … 2023-12-07 14:40:40 - QUIT SCRIPT: Removing default dialog file … 2023-12-07 14:40:40 - QUIT SCRIPT: Executing Completion Action Option: 'Restart Attended' … 2023-12-07 14:40:40 - COMPLETION ACTION: Restart, requiring user-interaction 2023-12-07 14:40:40 - The 'Self Service' process isn't running. 2023-12-07 14:40:50 - COMPLETION ACTION: Removing /var/tmp/ … 2023-12-07 14:40:50 - COMPLETION ACTION: Removing /var/tmp/overlayicon.icns … \\
@mrmte:
In a single test, on an unenrolled VM, running macOS 14.2 (23C63), via Terminal, the above snippet restarted the VM as expected.
debugMode="${5:-"false"}"
completionActionOption="${7:-"Restart"}"
(You'll also need to comment-out Line 395 if you're testing on un-enrolled Macs.)
I'm going to remove the "bug" label and you're again invited to join us on Slack.
Just noticed the following …
2023-12-07 14:40:40 - QUIT SCRIPT: Executing Completion Action Option: 'Restart Attended' …
… you may wish to verify your Jamf Pro settings for the script and its policy.
Yes I tried Restart Attended as well.. same thing. I don’t like slack, so I prefer not to use it.
OK; I'll most likely close this issue as I can't reproduce it.
Have you had a chance to test the following?
Also, if you disable
debugMode
and use the following snippet from 1. Welcome dialog doesn’t display, does the Mac restart?
timestamp=$( date '+%Y-%m-%d-%H%M%S' ) ; curl -o ~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash https://raw.githubusercontent.com/dan-snelson/Setup-Your-Mac/main/Setup-Your-Mac-via-Dialog.bash ; sudo bash ~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash
(Ultimately, SYM is just "window dressing" for your Jamf Pro policies; is there something preventing the Mac from restarting.)
Thanks Dan, I’ll take a look a bit later.
Thanks very much Dan for your help on this, much appreciated. Not sure why but in the script i change shutdown to /sbin/shutdown and now it works without any issue :)
Also just like to say this is the best onboarding and thank you for this :)
i think i actually found the likely cause. My cleanup script had an exit 0. I take it the script also is looking for that and then just stopped. After i removed the exit 0 it seems now reliable to reboot.
Describe the bug A clear, concise description of the bug. Machine does not restart
To Reproduce
Expected behavior A clear, concise description of what you expected to happen. expect the machine to restart
Code/log output Please supply the full command used, and if applicable, add full output from Terminal. Either upload the log, or paste the output in a code block (triple backticks at the start and end of the code block, please!).
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context Add any other context about the problem here.