mirror of
https://github.com/munki/munki.git
synced 2026-04-26 15:00:08 -05:00
Merge branch 'Munki5dev' into new-msc-design
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2017-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2018-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2017-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2010-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2010-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2011-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2008-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2009-2020 Greg Neagle.
|
||||
@@ -218,6 +218,24 @@ def runScript(script, display_name, runtype):
|
||||
display.display_warning(unicode_or_str(err))
|
||||
return result
|
||||
|
||||
def cleanup(runtype):
|
||||
"""
|
||||
If there are executables inside the cleanup directory, run them and remove them if successful
|
||||
"""
|
||||
cleanupdir = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), 'cleanup')
|
||||
if not os.path.isdir(cleanupdir):
|
||||
# path doesn't exist or isn't a directory
|
||||
return
|
||||
|
||||
# get only filenames (and not directory names) from cleanupdir
|
||||
(_, _, filenames) = next(os.walk(cleanupdir))
|
||||
for filename in filenames:
|
||||
script_path = os.path.join(cleanupdir, filename)
|
||||
result = runScript(script_path, 'cleanup', runtype)
|
||||
if not result:
|
||||
# no output is a good thing
|
||||
os.remove(script_path)
|
||||
|
||||
|
||||
def doInstallTasks(do_apple_updates, only_unattended=False):
|
||||
"""Perform our installation/removal tasks.
|
||||
@@ -824,6 +842,9 @@ def main():
|
||||
# Set environment variable for verbosity
|
||||
os.environ['MUNKI_VERBOSITY_LEVEL'] = str(options.verbose)
|
||||
|
||||
# Run cleanup scripts if required
|
||||
cleanup(runtype)
|
||||
|
||||
if options.installonly:
|
||||
# we're only installing, not checking, so we should copy
|
||||
# some report values from the prior run
|
||||
@@ -1156,7 +1177,7 @@ def main():
|
||||
time.sleep(2)
|
||||
startLogoutHelper()
|
||||
elif osutils.getconsoleuser() == u'loginwindow':
|
||||
# someone is logged in, but we're sitting at the loginwindow
|
||||
# someone is logged in, but we're sitting at the loginwindow
|
||||
# due to to fast user switching so do nothing
|
||||
munkilog.log('Skipping user notification because we are at the'
|
||||
'loginwindow.')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2011-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2010-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2018-2020 Greg Neagle.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2011-2017 Google Inc. All Rights Reserved.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2009-2020 Greg Neagle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/munki/python
|
||||
#!/usr/local/munki/munki-python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2011-2013 Google Inc. All Rights Reserved.
|
||||
|
||||
Reference in New Issue
Block a user