as topic states, we have been using Tlarkin's script to prompt the user to set their asset tag, but that is no longer working with our casper suite 9.22 and Mavericks.
This is the script as we are currently using it:
#!/bin/bash
# use apple script and bash to get input from user to update asset tags in the JSS
# by Tom Larkin
# modified by Barnes, Walter 1/21/14
# proof of concept, no warranty given, use at own risk
# get user input from Apple Script and try to redirect output back into bash and user recon to update the JSS
VARIABLE=$(sudo /usr/bin/osascript <<-AppleScript
tell application "System Events"
activate
display dialog "Enter your asset number" default answer "Enter your Macbook's fixed asset tag number here"
set theAnswer to (text returned of result)
set cmd to "sudo /usr/sbin/jamf recon -assetTag " & theAnswer
do shell script cmd
end tell
AppleScript)
$VARIABLE
exit 0
The JSS reports this error:Executing Policy Set Asset Tag...
[STEP 1 of 1]
Creating directory structure for /Library/Application Support/JAMF/Downloads/
Downloading https://kibsdjss.kibsd.org/Scripts/SetAssetTag.sh...
Running script SetAssetTag.sh...
Script exit code: 0
Script result: 38:46: execution error: An error of type -10810 has occurred. (-10810)
Any ideas as to what may be the culprit with the changes mentioned?