The 5.3.53177 release of the KACE Agent contains a bug that causes the "Agent Alert!" icon to appear in the dock during every inventory update, even though it should only appear when an alert is pushed to the client machine. (See this ITNinja Q for more details: http://www.itninja.com/question/admin-alert-poping-on-apple-systems)
To automatically fix this issue on affected OS X 10.5 systems, I have created a script that will apply the necessary plist fix, so that it doesn't have to be manually changed on each affected system.
1) First, create a file named plist_fix.sh containing the following: **(The number highlighted in red must be changed to the script # you create on step 3)**
#!/bin/sh
rm -rf /Library/Application\ Support/Dell/KACE/bin/AdminAlert.app/Contents/info.plist
sleep 10
ditto /Library/Application\ Support/Dell/KACE/data/scripts/87/Info.plist /Library/Application\ Support/Dell/KACE/bin/AdminAlert.app/Contents/
sleep 5
sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 4 0
exit 0
2) Next, create a copy of the Info.plist file located in ... with the following additional entries at the bottom of the file:
<key>LSUIElement</key>
<true/>
<key>plist_fixed</key>
<string>Yes</string>
</dict>
</plist>
3) Finally, create an "Offline KScript" and attach the 2 files created above as dependencies, and add the following Job rules:
Verify
On SuccessRemediation
On Remediation SuccessOn Remediation Failure
|
The Script can be run as a 'one-time' push to all OS X 10.5 machines, or you can create a Custom Inventory Rule and Smart Label based on the plist_fixed key. You can then schedule the script to run regularly on machines which are labled as not having that plist entry.
The Custom Inventory Rule I used to identify machines which have had this fix applied is:
I then Created a smart label to identify the applicable (10.5) machines which did not yet have this plist entry (Keep in mind we you may have to change the ORG5 prefix to suit your environment):
select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
from ORG5.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID
LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID
AND KUID_ORGANIZATION.ORGANIZATION_ID = 5
where (((( MACHINE.CLIENT_VERSION like '%5.3.53177%')
AND OS_VERSION like '%10.5%')
AND (1 not in (select 1 from ORG5.SOFTWARE, ORG5.MACHINE_SOFTWARE_JT
where MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
and MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
and SOFTWARE.DISPLAY_NAME = 'Fixed plist for 10.5 Machines running agent 5.3.53177')) ))
Comments