Commit Graph

66 Commits

Author SHA1 Message Date
Justin McWilliams
51cb83d350 managedsoftwareupdate: Use single quotes for all non-doctstring and non-heredoc strings.
git-svn-id: http://munki.googlecode.com/svn/trunk@746 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 03:44:55 +00:00
Justin McWilliams
eeb5bdcb9d Make some global consts for ManagedInstalls(.plist) paths. Replace single-quoted docstrings with double-quotes to standardize across codebase.
git-svn-id: http://munki.googlecode.com/svn/trunk@743 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 01:05:37 +00:00
Justin McWilliams
1ca7fc80e8 Merge: Verify permissions of preflight and postflight scripts are secure before; skip execution of insecure skips but continue Munki run.
git-svn-id: http://munki.googlecode.com/svn/trunk@738 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-09 21:42:27 +00:00
Greg Neagle
6e308faf40 Misc cleanups
git-svn-id: http://munki.googlecode.com/svn/trunk@732 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-07 23:18:47 +00:00
Justin McWilliams
1465884431 pylint cleanup and docstring updates for managedsoftwareupdate.
git-svn-id: http://munki.googlecode.com/svn/trunk@729 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-07 19:28:27 +00:00
Greg Neagle
121ecb0484 munkicommon: pylint cleanup, better handling of items in the pkgutil database that don't have a version number (I didn't know this was possible!).
appleupdates: pylint cleanup; provide installed_size data for Managed Software Update display

managedsoftwareupdate: move "Checking for available Apple Software Updates..." message to appleupdates.checkForSoftwareUpdates()

makepkginfo: fix installer_item_size determination when we add up the contents of a directory (was bytes, now Kbytes like everything else)

git-svn-id: http://munki.googlecode.com/svn/trunk@725 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-07 18:04:40 +00:00
Greg Neagle
86cbaee5da If the user clicks the Stop button during an update check, don't check for Apple Software Updates.
git-svn-id: http://munki.googlecode.com/svn/trunk@694 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-08-27 15:11:02 +00:00
Greg Neagle
255271ed6e Fixed use of new munki pref "SuppressUserNotification" in managedsoftwareupdate
git-svn-id: http://munki.googlecode.com/svn/trunk@664 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-08-14 18:22:46 +00:00
Greg Neagle
6776f3f4c1 pylint cleanups.
git-svn-id: http://munki.googlecode.com/svn/trunk@653 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-08-04 22:38:56 +00:00
Greg Neagle
fe1b86e46a Change so SuppressAutoInstall will not suppress a checkandinstallatstartup run.
git-svn-id: http://munki.googlecode.com/svn/trunk@610 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-27 23:18:52 +00:00
Greg Neagle
00cb701119 Log when we kill the loginwindow.
git-svn-id: http://munki.googlecode.com/svn/trunk@608 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-27 17:17:19 +00:00
Greg Neagle
cd35984e7c Changed checkandinstallatstartup logic to restart the loginwindow if we've performed updates but haven't restarted.
git-svn-id: http://munki.googlecode.com/svn/trunk@607 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-27 17:15:10 +00:00
Greg Neagle
bdd0f8e603 Add support for new preferences "SuppressUserNotification" and "SuppressAutoInstall".
SuppressUserNotification prevents munki from notifying a logged-in user of available updates.

SuppressAutoInstall prevents munki from automatically installing when at the loginwindow.

git-svn-id: http://munki.googlecode.com/svn/trunk@606 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-27 16:47:36 +00:00
Greg Neagle
194f2466a5 Fix so postflight script doesn't get run twice.
git-svn-id: http://munki.googlecode.com/svn/trunk@596 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-21 21:49:25 +00:00
Greg Neagle
5cf6381db7 Changes to work with new version of Managed Software Update.app
git-svn-id: http://munki.googlecode.com/svn/trunk@584 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-21 03:00:55 +00:00
Greg Neagle
941a48aae1 Changed the network up check when running at startup.
git-svn-id: http://munki.googlecode.com/svn/trunk@570 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-01 21:46:25 +00:00
Greg Neagle
7f8261ea99 Call recordUpdateCheckResult() when preflight script aborts the managedsoftware update run.
git-svn-id: http://munki.googlecode.com/svn/trunk@559 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-22 17:59:30 +00:00
Greg Neagle
68f3aaaabb Pre- and postflight script support.
git-svn-id: http://munki.googlecode.com/svn/trunk@549 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-08 20:41:55 +00:00
Greg Neagle
479203fecc Fixes an issue where a bad CatalogURL for Apple Software Update would cause an unhandled exception in appleupdates.py.
Better exception handling in managedsoftwareupdate.

git-svn-id: http://munki.googlecode.com/svn/trunk@548 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-08 17:25:15 +00:00
Greg Neagle
59a2697a04 Added support for a "postrun" script.
git-svn-id: http://munki.googlecode.com/svn/trunk@547 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-03 22:44:36 +00:00
Greg Neagle
e1237584d3 Changes to how and when Apple Software Update is run.
git-svn-id: http://munki.googlecode.com/svn/trunk@540 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-05-26 17:04:34 +00:00
Greg Neagle
cdc0ef777f Added ipconfig waitall for startup runs.
checkandinstallatstartup now does not clear its flag until there's nothing to do; it will run, install and restart until there is nothing to do.

git-svn-id: http://munki.googlecode.com/svn/trunk@538 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-05-25 22:20:45 +00:00
Greg Neagle
12f7e81c8a Simplified tasks when munki server is not available.
git-svn-id: http://munki.googlecode.com/svn/trunk@530 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-04-27 19:05:46 +00:00
Greg Neagle
f988882003 managedsoftwareupdate: when notifying the user of available updates, we now kill any instances of Managed Software Update.app if it's already open; then we launch Managed Software Update.app in the current console user's session. This prevents stale data from being presented to one or more users, and provides a cleaner signalling mechanism for Managed Software Update.app; it now displays updates only if any exist at launch. We no longer have to figure out when to try to display available updates later.
git-svn-id: http://munki.googlecode.com/svn/trunk@529 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-04-27 18:25:13 +00:00
Greg Neagle
25e1788b24 Minor fixes
git-svn-id: http://munki.googlecode.com/svn/trunk@522 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-04-26 16:41:08 +00:00
Greg Neagle
f87d3b78e8 Removed some munkistatus workaround code.
git-svn-id: http://munki.googlecode.com/svn/trunk@464 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-18 00:53:54 +00:00
Greg Neagle
eb43b858a3 Various cleanups: replaced use of dateutil.dateparse methods with NSDate methods, etc.
git-svn-id: http://munki.googlecode.com/svn/trunk@459 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-17 18:42:10 +00:00
Greg Neagle
14c94e8f9f Add a short sleep to the loop than waits for the other instance(s) of managedsoftwareupdate to exit.
git-svn-id: http://munki.googlecode.com/svn/trunk@454 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-09 16:28:48 +00:00
Greg Neagle
c6025b5500 managedsoftwareupdate: better handle the case where manaagedsoftwareupdate --auto is already running when a user invokes Managed Software Update.app
git-svn-id: http://munki.googlecode.com/svn/trunk@452 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-08 23:18:12 +00:00
Greg Neagle
5c128b5574 munkicommon: New currentGUIusers() function to get list of current GUI users
managedsoftwareupdate: makes use of munkicommon.currentGUIusers() to more accurately determine if anyone is logged in to the GUI (Fast User Switching aware)

git-svn-id: http://munki.googlecode.com/svn/trunk@445 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-06 00:55:06 +00:00
Greg Neagle
36e4d6e727 Stub code for the case where Fast User Switching is active, we're switched to the loginwindow with one or more users logged in, and we need to restart.
git-svn-id: http://munki.googlecode.com/svn/trunk@443 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-05 23:00:29 +00:00
Greg Neagle
47385bac22 Changes to use the new LaunchAgent mechanism to allow managedsoftwareupdate (running in the root context) to reliably launch Managed Software Update.app in the user's context.
git-svn-id: http://munki.googlecode.com/svn/trunk@437 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-04 18:56:48 +00:00
Greg Neagle
100ef1d783 Better Pythonized the getIdleSeconds() function.
git-svn-id: http://munki.googlecode.com/svn/trunk@431 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-01-10 17:24:06 +00:00
Greg Neagle
1ce32d0d51 Minor output tweaks.
git-svn-id: http://munki.googlecode.com/svn/trunk@430 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-01-10 16:47:58 +00:00
Greg Neagle
c1acf06795 Updated copyright info for 2010; added cleanup of launchd launch paths for runtype = "installwithnologout" and runtype = "manualcheck".
git-svn-id: http://munki.googlecode.com/svn/trunk@418 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-01-06 00:34:03 +00:00
Greg Neagle
a747271859 Some changes to better handle Fast User Switching
git-svn-id: http://munki.googlecode.com/svn/trunk@405 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-16 17:48:38 +00:00
Greg Neagle
e8c33ce5fd Version changed to 0.4.7
Added default value manualcheck=False to notifyUserOfUpdates() in managedsoftwareupdate.

git-svn-id: http://munki.googlecode.com/svn/trunk@387 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-02 00:03:21 +00:00
Greg Neagle
931feef795 Added new flag: --installwithnologout to be used by launchd Launch Daemon when a user kicks off an install session without logging out. No new functionality, just better bookkeeping.
git-svn-id: http://munki.googlecode.com/svn/trunk@385 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-25 19:56:03 +00:00
Greg Neagle
844054c57b Fixed restart problem introduced with the try/except block around installer.run() in managedsoftwareupdate
git-svn-id: http://munki.googlecode.com/svn/trunk@382 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-24 23:46:05 +00:00
Greg Neagle
e0b27a8841 Added try/except around calls to updatecheck.check, installer.run, and appleupdates.installAppleUpdates so we can capture unhandled exceptions and report/log them.
git-svn-id: http://munki.googlecode.com/svn/trunk@380 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-23 17:05:51 +00:00
Greg Neagle
c93fb32e7a Changed timing of recordUpdateCheckResult() so Managed Software Update.app would display an appropriate message if there were no munki updates and Apple's Software Update was also checked.
git-svn-id: http://munki.googlecode.com/svn/trunk@378 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-20 18:35:31 +00:00
Greg Neagle
3a9ee38de9 Changed logic around Apple Updates:
if munki updates are available, they are applied, and Apple Updates are ignored.
	Apple Updates are presented and acted upon only if InstallAppleSoftwareUpdates preference is set and there are no available munki updates. 

git-svn-id: http://munki.googlecode.com/svn/trunk@375 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-19 03:26:25 +00:00
Greg Neagle
451bb6ca10 Fixed exception tuple,
git-svn-id: http://munki.googlecode.com/svn/trunk@359 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 05:19:59 +00:00
Greg Neagle
0b55bf27ae Cleaned up exception handling
git-svn-id: http://munki.googlecode.com/svn/trunk@357 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 04:43:50 +00:00
Greg Neagle
cdba90d75e PEP-8 cleanup
git-svn-id: http://munki.googlecode.com/svn/trunk@353 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 02:22:49 +00:00
Greg Neagle
9351ba9bc6 Reorganized the if/then logic to make the flow with the various options a bit cleaner/clearer.
git-svn-id: http://munki.googlecode.com/svn/trunk@328 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-16 17:25:16 +00:00
Greg Neagle
f80eff278b Logic changes to get proper logoutinstall behavior when there is an available Apple Update but no munki update.
git-svn-id: http://munki.googlecode.com/svn/trunk@322 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-12 00:09:26 +00:00
Greg Neagle
d0c6b3ade4 Logging and reporting changes.
Added check for server availability before starting an update session.

git-svn-id: http://munki.googlecode.com/svn/trunk@320 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-11 23:39:32 +00:00
Greg Neagle
1b1d43b125 Added support for log rolling to managedsoftwareupdate.
git-svn-id: http://munki.googlecode.com/svn/trunk@317 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-05 17:39:58 +00:00
Greg Neagle
6524802657 Renamed munkicommon.version() to munkicommon.get_version() to prevent name conflict with the version library from the distutil module.
git-svn-id: http://munki.googlecode.com/svn/trunk@305 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-02 23:10:12 +00:00