Posted on 12-20-2018 07:13 AM
Has anyone ever seen these from a Policy calling a Script that only uses JamfHelper?
Script result: 2018-12-20 13:58:10.156 jamfHelper[3537:29215] isPrefsCreateCacheFromEnabledAndDefaultInputSources - can't find anything from GetInputSourceEnabledPrefs, use defaultASCIIKeyLayoutDict = {type = immutable dict, count = 3,
entries =>
0 : {contents = "InputSourceKind"} = {contents = "Keyboard Layout"}
1 : {contents = "KeyboardLayout Name"} = British
2 : {contents = "KeyboardLayout ID"} = {value = +2, type = kCFNumberSInt64Type}
}
result 0
Solved! Go to Solution.
Posted on 01-02-2019 12:30 PM
I got the same error message using osascript
which I note this script does.
The issue was resolved by adding an extra keyboard. See https://stackoverflow.com/q/53603246/1265167 for more info.
Posted on 12-20-2018 07:14 AM
Code snippet below
#!/bin/sh
################################################################################################
# jamfHelper Variables
################################################################################################
# Get the current logged in username (jamf recommended method)
loggedInUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon=/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ToolbarCustomizeIcon.icns
windowType="hud"
description="Software Updates have been installed and a system restart is required.
This system WILL reboot automatically in 4 hours OR you can reboot now by clicking the Reboot button.
After the reboot, it can take between 30 minutes to an hour to apply the updates (including after login).
If you are prompted for either Startup Disk or Update Now please click Update Now."
button1="Reboot Now"
title="Restart Required"
alignDescription="left"
alignHeading="center"
defaultButton="1"
timeout="14400"
#################################################################################################
# jamfHelper Window
#################################################################################################
PROMPT=$("$jamfHelper" -windowType "$windowType" -lockHUD -title "$title" -defaultButton
"$defaultButton" -icon "$icon" -description "$description"
-alignDescription "$alignDescription" -alignHeading "$alignHeading" -button1 "$button1"
-timeout "$timeout" -countdown )
echo "$(date) Jamf Helper was launched for Software Update Reboot Prompt" >> /var/log/JAMFSoftwareUpdates.log
echo "result $PROMPT"
if [ "$PROMPT" == "0" ];
then
sudo -u ${loggedInUser} osascript -e 'tell app "System Events" to restart'
fi
exit 0
Posted on 01-02-2019 12:30 PM
I got the same error message using osascript
which I note this script does.
The issue was resolved by adding an extra keyboard. See https://stackoverflow.com/q/53603246/1265167 for more info.