Greg Neagle
4b71ace130
Updated copyright info on all files with copyright info.
2013-01-28 11:55:09 -08:00
Greg Neagle
cbb385f540
Add support for a new 'SuppressLoginwindowInstall' key in Munki's preferences (ManagedInstalls.plist).
...
This causes installs/removals to be suppressed at the loginwindow unless an install/uninstall is marked
with unattended_install = True or unattended_uninstall = True.
This is different from the behavior with the existing 'SuppressAutoInstall' key, which suppresses all "automatic" installs;
that is, Munki will not install _anything_ without first notifying the user.
2013-01-14 15:03:01 -08:00
Justin McWilliams
c9b505fc9a
Use munkicommon.log() to log Python tracebacks in cases where exceptions are reraised causing Munki to crash and print the same traceback to stderr. Otherwise, the tracebacks are displayed to users twice when running from the commandline.
2012-10-24 18:37:27 -04:00
Justin McWilliams
5a4a4f572e
Clearly define and use exit status codes in managedsoftwareupdate.
...
In cases where unknown exceptions are caught for logging purposes, log and reraise the exception so munki crashes with a Python traceback, instead of exiting.
2012-10-24 12:19:22 -04:00
Greg Neagle
f1d8df900e
Add signal handler for SIGTERM so objects can get cleaned up if managedsoftware update gets killed. This should cause launchd processes we've started (like for /usr/sbin/installer and /usr/sbin/softwareupdate) to be stopped as well.
2012-08-16 13:47:30 -07:00
Justin McWilliams
a8c7bd9dc2
Log when managedsoftwareupdate is about to notify users with MSU GUI.
2012-06-07 15:53:08 -04:00
Greg Neagle
3fe3450d7d
Fix typo in networkUp() when checking for non-loopback interfaces
2012-05-07 11:33:42 -07:00
Greg Neagle
34ab750460
Changes to allow curl to follow redirects when retreiving an Apple sucatalog; this is needed to support Lion Server's Software Update service.
2012-02-14 16:51:34 -08:00
Justin McWilliams
4071808f6e
"Another instance of managedsoftwareupdate is running. Exiting." is now (once again?) logged to ManagedSoftwareUpdate.log instead of only being outputted to system.log.
2012-01-27 21:49:23 -05:00
Greg Neagle
3a049c4c46
Do not notify user via MSU.app until after postflight script has completed.
2012-01-20 15:04:04 -08:00
Greg Neagle
69968229c0
managedsoftwareupdate: warn if DaysBetweenNotifications is not an integer.
2012-01-17 16:45:24 -08:00
Greg Neagle
05e3df8704
Save ApplicicationInventory report for possible use by postflight reporting scripts
2012-01-17 08:21:18 -08:00
Greg Neagle
a0decf2625
Change copyright notice to 2010-2012
2012-01-04 13:52:33 -08:00
Greg Neagle
c916885e03
Added munkicommon.display_status_major and renamed munkicommon.display_status to munkicommon.display_status_minor; changes to more closely map the munkistatus-style output to the stdout-style output
2011-12-21 11:28:52 -08:00
Greg Neagle
c01eb685a9
Spacing fix in managedsoftwareupdate; try/except in manifestutil so a bad manifest doesn't cause an unhandled exception.
2011-12-05 09:45:59 -08:00
Justin McWilliams
06801d2ef7
Reduce the likihood of a lingering /var/run/com.googlecode.munki.ManagedSoftwareUpdate by sleeping for 1/2 a second (instead of .1) and using open() instead of subprocess+touch to write the file.
2011-11-08 12:42:41 -05:00
Justin McWilliams
c803e1ba89
Remove printing preflight stderr, as it's been moved to runScript.
2011-10-17 18:48:15 -04:00
Justin McWilliams
c938311b2c
Move "Starting managedsoftwareupdate run" to before executing preflight,
...
"Ending ..." to after executing postflight, and add the runtype to the starting
msg so it's clear who/what is executing Munki and for what reason.
2011-10-14 16:19:38 -04:00
Greg Neagle
31dee71a55
Fix for issue when MSU.app is launched by managedsoftwareupdate more than one minute after an updatecheck run has completed (due to unattended installs, apple update checking, or combo) and add AppleUpdates to ManagedSoftwareReport.plist
2011-09-20 20:01:55 -07:00
Greg Neagle
cab84a49d2
Check SuppressAutoInstall value before attempting unattended installs
2011-09-19 10:13:44 -07:00
Greg Neagle
fd1622edfa
Don't kill loginwindow if we're doing checkandinstallatstartup and a restart is not required; launchd will restart us.
2011-09-16 17:05:59 -07:00
Rob Middleton
a572573fbb
Reset report data structure before any calls that add warnings/errors.
2011-09-15 18:27:10 +10:00
Greg Neagle
833d509c94
Fix - send update notification to MSU.app after an unattended install; fix method signature for utils.runExternalScript
2011-09-14 16:43:50 -07:00
Greg Neagle
2acd81991b
Merge branch 'status-launch-and-cache-on-checksum' of https://code.google.com/p/munki into status-launch-and-cache-on-checksum
2011-09-14 15:36:17 -07:00
Greg Neagle
239663353f
Fix issues in munki.py when writing trigger files; edits to launchdaemons so managedsoftwareupdate-loginwindow runs only when a trigger file is present
2011-09-14 15:31:42 -07:00
Rob Middleton
570c0f7ad4
Allow preflight/postflight to run so long as the permissions are not weaker than managedsoftwareupdate.
2011-09-14 21:31:31 +10:00
Justin McWilliams
d03b2ba11f
Merging forced_install_after_date branch to trunk.
...
This adds Force Install Notifications support to the MSU GUI, and logouthelper support to managedsoftwareupdate/launchd. Documentation on using the pkginfo force_install_after_date key to come....
This merge also includes localization fixes and on-the-fly updating of the MSU GUI when managedsoftwareupdate runs in the background while the GUI is open, changing InstallInfo.
With this merge, the Munki version is increased to 0.8.0 and MSU GUI version to 3.2.
git-svn-id: http://munki.googlecode.com/svn/trunk@1270 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-04 19:23:19 +00:00
Justin McWilliams
0e858b098a
Munki should output and log preflight output, both stdout and stderr, and should output and log postflight return codes if != 0 (even though it doesn't perform any different actions).
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1269 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-04 18:35:36 +00:00
John Randolph
20867d6c9e
merge in changes from /branches/force_install_after_date/
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1207 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-06-03 18:55:30 +00:00
Greg Neagle
b33739f931
Updated copyright info printed when managedsoftwareupdate runs.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1204 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-27 16:37:43 +00:00
Justin McWilliams
81e560d696
oops, fixing indentation ;/
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1120 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-15 21:51:56 +00:00
Justin McWilliams
1687e8be9b
Display "Performing postflight tasks...." before running an existing postflight script, to explain the delay between "No changes to managed software are available." and the script exiting.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1119 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-15 21:50:18 +00:00
Justin McWilliams
f17935640c
Enhancement of r1103, cleaning up how getIdleSeconds() works.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1104 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-11 15:32:13 +00:00
Justin McWilliams
53d16dd778
Fix but in getIdleSeconds() where ioreg output is split, but there are inconsistent number of whitespaces.
...
I ran into a machine where "parts" was: ['|', '|', '"HIDIdleTime"', '=', '1458195167613966'], and since parts[3] is "=" getIdleSeconds() was crashing trying to convert it to int().
So return int(int(parts[3])/1000000000) should really be parts[4] on this machine, but this may be inconsistent on different machines?
# /usr/sbin/ioreg -c IOHIDSystem -d 4 | grep Idle
| | "HIDIdleTime" = 1458351496253133
So let's just use regex to parse the integer out of the line more safely.
git-svn-id: http://munki.googlecode.com/svn/trunk@1103 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-09 15:10:46 +00:00
Justin McWilliams
e84453eb5f
s/forced_(un)install/unattended_(un)install/g
...
s/only_forced/only_unattended/g
Change forced_* pkginfo key names to more accurately describe what's happening, since they're not "forced" in the true sense of the word.
Admins should include both forced_* and unattended_* keys in their pkginfos while migrating to client releases after this change, to ensure both old and new clients have desired pkg push agressiveness :(
git-svn-id: http://munki.googlecode.com/svn/trunk@1098 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-08 16:23:45 +00:00
Justin McWilliams
3f3a3b4dfd
utils.runExternalScript should return stderr, and preflight/postflight stderr should be displayed and logged if return != 0
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1092 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-04 21:38:33 +00:00
John Randolph
b6cb650938
add
...
--applesuspkgsonly
--munkipkgsonly
options to managedsoftwareupdate to override which packages it looks at
git-svn-id: http://munki.googlecode.com/svn/trunk@1084 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-22 22:00:49 +00:00
Greg Neagle
7390b94f46
Minor change to notifyUserOfUpdates() in managedsoftwareupdate.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1013 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-27 23:01:34 +00:00
Greg Neagle
a853f78c9f
Update copyright dates across the board.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1010 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-25 18:22:14 +00:00
Greg Neagle
abe3d2a1de
appleupdates.py now creates its own .dist files to manage installation of downloaded Apple Software Updates, replacing the earlier technique of just installing the individual packages in filename order.
...
In most invocations of subprocess.Popen, change the bufsize from 1 to -1, which changes from line-buffered to "big" buffers.
Other minor changes to align with the appleupdates,py changes and some pylint-recommended cleanup.
git-svn-id: http://munki.googlecode.com/svn/trunk@995 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-14 19:11:05 +00:00
Greg Neagle
739df8dcd8
Defensive coding around munkicommon.display_error and munkicommon.display_warning to avoid a KeyError if munkicommon.report is missing the Errors or Warnings keys.
...
Similar defensive coding in installer.py for the InstallResults and RemovalResults keys.
Safer report initialization in managedsoftwareupdate.
git-svn-id: http://munki.googlecode.com/svn/trunk@993 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-04 19:33:25 +00:00
Greg Neagle
769e8dab91
Reworked reports to show more relevant data on ManagedInstalls. install-only munki sessions also carry over data from the previous run so the report is more complete.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@980 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-15 21:34:25 +00:00
Justin McWilliams
f098fb9d1d
Typo fix: s/Perfoming/Performing/ in preflight task MSU notification.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@978 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-15 18:13:56 +00:00
Greg Neagle
681acae624
Add MCX support, based on code contribution from Dan Roque.
...
Other minor clean-ups.
git-svn-id: http://munki.googlecode.com/svn/trunk@973 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-13 20:11:22 +00:00
Rob Middleton
f87284d4d4
Remove tmpdir at expected exits of managedsoftwareupdate. tmpdir is created by global line in munkicommon: "tmpdir = tempfile.mkdtemp()". More fiddly to make the change so tmpdir only created where there is demand for it.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@972 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-12 09:11:22 +00:00
Rob Middleton
1ff5d190fa
applesoftwareupdatesonly is not global / not in this scope
...
git-svn-id: http://munki.googlecode.com/svn/trunk@929 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-26 08:52:00 +00:00
Rob Middleton
32b7e37066
Fix to functionality added in r818. On GUI auto run, do forced installs, then prompt user if either munki updates still availalbe, or any apple updates available.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@928 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-25 02:03:29 +00:00
Greg Neagle
5be8b5ed84
If running a preflight script, call munkicommon.display_status so we tickle the munkistatus socket before it times out.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@922 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-18 22:25:00 +00:00
Greg Neagle
7e9f255085
Fixed idle check logic when running in 'checkandinstallatstartup' mode.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@872 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 20:38:27 +00:00
Greg Neagle
b901118418
Fix doc string formatting.
...
Re-check idle time when running in "checkandinstallatstartup" mode so we maximize our chances of getting all the updates done when bootstrapping.
git-svn-id: http://munki.googlecode.com/svn/trunk@869 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 18:52:06 +00:00