From 9ff9879959de417144d38a2224bf23ce7064dd8a Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Wed, 11 Nov 2009 23:41:24 +0000 Subject: [PATCH] Bumped Managed Software Update.app to version 1.3.2. Added new alert for when app cannot check for updates because the manifest server is not accessible. git-svn-id: http://munki.googlecode.com/svn/trunk@321 a4e17f2e-e282-11dd-95e1-755cbddbdd66 --- code/ManagedSoftwareUpdate/Info.plist | 4 ++-- .../ManagedSoftwareUpdate.applescript | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/code/ManagedSoftwareUpdate/Info.plist b/code/ManagedSoftwareUpdate/Info.plist index 6bf9c236..0bee6b30 100644 --- a/code/ManagedSoftwareUpdate/Info.plist +++ b/code/ManagedSoftwareUpdate/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3.1 + 1.3.2 CFBundleSignature mMSU CFBundleVersion - 1.3.1 + 1.3.2 NSAppleScriptEnabled YES NSMainNibFile diff --git a/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript b/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript index 7d17c030..7dfce8d8 100755 --- a/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript +++ b/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript @@ -300,16 +300,23 @@ on activated theObject set ManagedInstallPrefs to value of property list file ManagedInstallPrefsFile set lastCheckedDate to |LastCheckDate| of ManagedInstallPrefs + set lastCheckResult to |LastCheckResult| of ManagedInstallPrefs on error set lastCheckedDate to date "Thursday, January 1, 1970 12:00:00 AM" + set lastCheckResult to 0 end try end tell if now - lastCheckedDate < 10 then -- managedsoftwareupdate --manual just ran, but there are no updates -- because if there were updates, count of installitems > 0 show window "mainWindow" - display alert "Your software is up to date." message ¬ - "There is no new software for your computer at this time." default button "Quit" as informational attached to window 1 + if lastCheckResult is -1 then + display alert "Managed Software Update cannot check for updates right now." message ¬ + "Managed Software Update cannot contact the update server at this time." default button "Quit" as informational attached to window 1 + else + display alert "Your software is up to date." message ¬ + "There is no new software for your computer at this time." default button "Quit" as informational attached to window 1 + end if else -- no items to install, managedsoftwareupdate didn't finish checking recently -- so we are either checking or need to check