mirror of
https://github.com/munki/munki.git
synced 2026-04-24 05:49:42 -05:00
Fixes to force unmount call; __CFPREFERENCES_AVOID_DAEMON environment variable set to '1' upon makepkginfo invocation
This commit is contained in:
@@ -42,6 +42,9 @@ from munkilib import munkicommon
|
||||
from munkilib import FoundationPlist
|
||||
from munkilib import adobeutils
|
||||
|
||||
# circumvent cfprefsd plist scanning
|
||||
os.environ['__CFPREFERENCES_AVOID_DAEMON'] = "1"
|
||||
|
||||
|
||||
def getCatalogInfoFromDmg(dmgpath, options):
|
||||
"""
|
||||
@@ -631,10 +634,6 @@ def main():
|
||||
if os_version < (10, 6, 6):
|
||||
options.installer_choices_xml = False
|
||||
|
||||
# circumvent cfprefsd plist scanning
|
||||
if os_version >= (10, 8):
|
||||
os.environ['__CFPREFERENCES_AVOID_DAEMON'] = "1"
|
||||
|
||||
catinfo = {}
|
||||
installs = []
|
||||
if arguments:
|
||||
|
||||
@@ -845,7 +845,7 @@ def unmountdmg(mountpoint):
|
||||
Unmounts the dmg at mountpoint
|
||||
"""
|
||||
cmd = ['/usr/bin/hdiutil', 'detach', mountpoint]
|
||||
proc = subprocess.Popen(cmd, bufsize=1, stdout=subprocess.PIPE,
|
||||
proc = subprocess.Popen(cmd, bufsize=-1, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
(unused_output, err) = proc.communicate()
|
||||
if proc.returncode:
|
||||
@@ -853,10 +853,11 @@ def unmountdmg(mountpoint):
|
||||
display_warning('Polite unmount failed: %s' % err)
|
||||
display_warning('Attempting to force unmount %s' % mountpoint)
|
||||
cmd.append('-force')
|
||||
proc = subprocess.Popen(cmd, bufsize=1, stdout=subprocess.PIPE,
|
||||
proc = subprocess.Popen(cmd, bufsize=-1, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
(unused_output, err) = proc.communicate()
|
||||
if proc.returncode:
|
||||
display_warning('Failed to unmount %s' % mountpoint)
|
||||
display_warning('Failed to unmount %s' % mountpoint, err)
|
||||
|
||||
|
||||
def gethash(filename, hash_function):
|
||||
|
||||
Reference in New Issue
Block a user