@@ -138,9 +138,18 @@ def get_managed_install_report():
138
138
ManagedInstalls report for last Munki run as a plist
139
139
dict, or an empty dict.
140
140
"""
141
+ # Checks munki preferences to see where the install directory is set to.
142
+ managed_install_dir = munkicommon .pref ('ManagedInstallDir' )
143
+
144
+ # set the paths based on munki's configuration.
145
+ managed_install_report = os .path .join (
146
+ managed_install_dir , 'ManagedInstallReport.plist' )
147
+
148
+ munkicommon .display_debug2 (
149
+ "Looking for munki's ManagedInstallReport.plist at {} ..." .format (
150
+ managed_install_report ))
141
151
try :
142
- munki_report = FoundationPlist .readPlist (
143
- '/Library/Managed Installs/ManagedInstallReport.plist' )
152
+ munki_report = FoundationPlist .readPlist (managed_install_report )
144
153
except FoundationPlist .FoundationPlistException :
145
154
munki_report = {}
146
155
@@ -457,9 +466,11 @@ def send_hashed(ServerURL, hashed_data):
457
466
hashurl = os .path .join (
458
467
ServerURL , 'inventory/hash' , hashed_data ['serial' ], '' )
459
468
inventorysubmiturl = os .path .join (ServerURL , 'inventory/submit' , '' )
460
-
461
- inventoryplist = '/Library/Managed Installs/ApplicationInventory.plist'
462
-
469
+ managed_install_dir = munkicommon .pref ('ManagedInstallDir' )
470
+ inventoryplist = os .path .join (
471
+ managed_install_dir , 'ApplicationInventory.plist' )
472
+ munkicommon .display_debug2 (
473
+ 'ApplicationInventory.plist Path: {}' .format (inventoryplist ))
463
474
inventory , inventory_hash = utils .get_file_and_hash (inventoryplist )
464
475
if inventory :
465
476
serverhash = None
@@ -512,8 +523,10 @@ def run_external_scripts(runtype):
512
523
munkicommon .display_debug2 (
513
524
"Couldn't run %s" ) % os .path .join (root , script )
514
525
else :
515
- munkicommon .display_debug2 (
516
- "%s is not executable or has bad permissions" ) % os .path .join (root , script )
526
+ script_path = os .path .join (root , script )
527
+ munkicommon .display_debug1 (
528
+ "{0} is not executable or has bad permissions.." .format (
529
+ script_path ))
517
530
518
531
519
532
def send_catalogs (ServerURL , catalog_data ):
0 commit comments