We have our jamfhelper.sh set to run at enrollment to prompt to enter the new computer name. That part of the script has stopped working recently. We are not getting the popup anymore to enter the name but the part of the script after the sleep to show the please wait message is working fine. The ones we have seen the issue on are 10.13.x systems.
What is odd is if we just test the script using something like code runner the box pops up and everything works just fine but when it tries during enrollment its no dice, also if i test it in the built in script editor it wont work either.
The script is set to run Before as well.
Here is our script:
!/bin/sh
assignment=$(/usr/bin/osascript<<END
tell application "System Events"
activate
set the answer to text returned of (display dialog "Enter the name of this device Ex. CHOSXxxxxLPT1" default answer "" buttons {"Continue"})
end tell
END)
scutil --set HostName "$assignment"
scutil --set LocalHostName "$assignment"
scutil --set ComputerName "$assignment"
sleep 3
/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType fs -title "Imaging in progress." -heading "Please wait until the machine reboots." -description "Imaging in progress." -icon /System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns &
exit 0
