mirror of
https://github.com/munki/munki.git
synced 2026-03-15 05:50:16 -05:00
Managed Software Update now defaults to using /Library/Managed Installs/InstallInfo.plist if /Library/Preferences/ManagedInstalls.plist is missing or the ManagedInstallDir key is missing.
git-svn-id: http://munki.googlecode.com/svn/trunk@102 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -22,9 +22,14 @@ property managedInstallDir : ""
|
||||
on itemstoinstall()
|
||||
set installlist to {}
|
||||
set ManagedInstallPrefs to "/Library/Preferences/ManagedInstalls.plist"
|
||||
set managedInstallDir to "/Library/Managed Installs"
|
||||
try
|
||||
tell application "System Events"
|
||||
set managedInstallDir to value of property list item "ManagedInstallDir" of property list file ManagedInstallPrefs
|
||||
end tell
|
||||
end try
|
||||
try
|
||||
tell application "System Events"
|
||||
set InstallInfo to managedInstallDir & "/InstallInfo.plist"
|
||||
set managedinstalllist to value of property list item "managed_installs" of property list file InstallInfo
|
||||
repeat with installitem in managedinstalllist
|
||||
@@ -93,7 +98,17 @@ on awake from nib theObject
|
||||
if contents of data cell "name" of theDataRow is "" then
|
||||
set contents of data cell "name" of theDataRow to |name| of installitem
|
||||
end if
|
||||
set contents of data cell "version" of theDataRow to version_to_install of installitem
|
||||
|
||||
set oldDelims to AppleScript's text item delimiters
|
||||
set AppleScript's text item delimiters to "."
|
||||
if (count of text items of version_to_install of installitem) > 3 then
|
||||
set shortVersion to text items 1 through 3 of version_to_install of installitem as text
|
||||
else
|
||||
set shortVersion to version_to_install of installitem
|
||||
end if
|
||||
set AppleScript's text item delimiters to oldDelims
|
||||
|
||||
set contents of data cell "version" of theDataRow to shortVersion
|
||||
set contents of data cell "description" of theDataRow to |description| of installitem
|
||||
try
|
||||
set contents of data cell "restartaction" of theDataRow to |RestartAction| of installitem
|
||||
|
||||
Reference in New Issue
Block a user