-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MunkiReport using wrong path to Munki ApplicationInventory.plist #1553
Comments
Please create this issue in the https://github.com/munkireport/inventory module's GitHub repo for proper tracking. |
@tuxudo |
@tuxudo The PostInstall script in the installer pkg contains the following line
It should be
Therefore the issue appears to be a bug in MunkReport-PHP 5.8.0.4284 and not my client Mac or setup or the inventory module. I have a suspicion this bug may have existed a while and therefore possibly also in 5.7. Since the bug is I believe now shown to be in MunkiReport-PHP itself and not the Inventory module I am re-opening this issue for MunkiReport-PHP itself. Note: I have tried generating the client installer pkg on two different Macs, a Mac running macOS Monterey 12.7.6 and a Mac running macOS Sonoma 14.6.1. I also tried using first an AutoPkg recipe and then using the direct URL approach as per the wiki.
All these result in the same bad entry in the PostInstall script in the installer pkg. |
I am not able to reproduce this. However, this issue is not with MunkiReport core, but with the module. Looking at line 76 of https://github.com/munkireport/munkireport-php/blob/5.x/app/views/install/install_script.php#L76, we can see the function that sets that line in the installer pkg. This function is called by the module's install.sh script. For the inventory module, this is either line 20 or 23 as seen here https://github.com/munkireport/inventory/blob/mr5-python3/scripts/install.sh#L20. Line 20 is the default and specifies As a test, edit the install.sh script on your MunkiReport server in the inventory module's folder. Verify that when removing line 20, the defaults write command to the incorrect file is removed is removed from the client pkg. Please discontinue this issue here and use the one in the inventory module. |
I already have Munki deployed and working to all our Macs. I push out settings via a managed profile i.e. an MDM server.
The Munki working directory location is the usual
/Library/Managed Installs/
and in that directory isApplicationInventory.plist
Unfortunately MunkiReport seems to be confused and its setup shows it is looking in
/Library/Preferences/Managed Installs/
does not exist and hence it does not find ApplicationInventory.plistThere is a
/Library/Preferences/ManagedInstalls.plist
but this is not the same thing.munkireport_runner -S
shows the following entryinventory = "/Library/Preferences/Managed Installs/ApplicationInventory.plist";
and the actual execution gives the corresponding error ofWARNING: Can't open /Library/Preferences/Managed Installs/ApplicationInventory.plist
As a result the Inventory choice in Listings is effectively empty as it only lists the computer, and App Versions Report shows no version information and clicking on an entry as per APPS_TO_TRACK in my .env goes to a table saying 'No data available in table', this includes the default Safari app.
I am using an Ubuntu 20 Server running Apache2 and PHP8 and MunkiReport-PHP 5.8.0.4284
The text was updated successfully, but these errors were encountered: