commit 91dbacb6366b0f71c0ce3000e3cf7a075dba78a5 Author: Greg Neagle Date: Mon Dec 17 16:11:34 2018 -0800 Log shut down actions no matter the logging level; don't require halt message to be at the beginning of a softwareupdate output line diff --git a/code/client/managedsoftwareupdate b/code/client/managedsoftwareupdate index a5db72c8..fac291dd 100755 --- a/code/client/managedsoftwareupdate +++ b/code/client/managedsoftwareupdate @@ -330,7 +330,10 @@ def startLogoutHelper(): def doRestart(shutdown=False): """Handle the need for a restart or a possbile shutdown.""" restartMessage = 'Software installed or removed requires a restart.' - munkilog.log(restartMessage) + if shutdown: + munkilog.log('Software installed or removed requires a shut down.') + else: + munkilog.log(restartMessage) if display.munkistatusoutput: munkistatus.hideStopButton() munkistatus.message(restartMessage) diff --git a/code/client/munkilib/appleupdates/au.py b/code/client/munkilib/appleupdates/au.py index 8bb93f6d..41689091 100644 --- a/code/client/munkilib/appleupdates/au.py +++ b/code/client/munkilib/appleupdates/au.py @@ -658,10 +658,10 @@ class AppleUpdates(object): pass elif output == '': pass - elif output.startswith('Please call halt'): + elif output.contains('Please call halt'): # This update requires we shutdown instead of a restart. display.display_status_minor(output) - display.display_debug2('This update requires a shutdown...') + display.display_info('### This update requires a shutdown. ###') self.shutdown_instead_of_restart = True else: display.display_status_minor(output) @@ -856,7 +856,9 @@ class AppleUpdates(object): munkistatus.showStopButton() if self.shutdown_instead_of_restart: - display.display_debug2('Found shutdown flag...') + display.display_info( + 'One or more Apple updates requires a shutdown instead of ' + 'restart.') restart_action = POSTACTION_SHUTDOWN return restart_action