Skip to content
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

postflight stderr: ERROR: Munkireport: ERROR: Can't open /Library/Preferences/com.apple.RemoteDesktop.plist #139

Closed
jimrt opened this issue Jul 11, 2014 · 5 comments
Labels

Comments

@jimrt
Copy link

jimrt commented Jul 11, 2014

I have been testing munkireport-php 2.0.11 in my DEV environment, mostly on Virtual Machines.

Some of these machines do not have a /Library/Preferences/com.apple.RemoteDesktop.plist file, so postflight throws an error every time it runs and Munki also logs the error in its own log files.

A quick fix might be to check for the existence of this file in app/modules/ard/scripts/install.sh

!/bin/bash

if [ -f "/Library/Preferences/com.apple.RemoteDesktop.plist" ]; then
# Add ARD Preferences to munkireport
defaults write ...
fi

Here is the full output when running Munki from the CLI:
md-mavericks:munki localadmin$ sudo /usr/local/munki/managedsoftwareupdate
Password:
Managed Software Update Tool
Copyright 2010-2013 The Munki Project
http://code.google.com/p/munki

Starting...
Performing preflight tasks...
preflight stdout: Munkireport: # Executing scripts in preflight_abort.d
Munkireport: # Executing scripts in preflight.d
Munkireport: Running bluetooth.sh
Munkireport: Running directoryservice.sh
Munkireport: Running disk_info
Munkireport: Running displays.py
Munkireport: Running filevaultstatus
Munkireport: filevaultstatus Error: Error: FileVault is Off.
Munkireport: Running localadmin
Munkireport: Running networkinfo.sh
Munkireport: Running warranty
Munkireport: Running submit.preflight
Checking for available updates...
Retrieving list of software for this machine...
0..20..40..60..80..100
Checking Apple Software Update catalog...
Skipping Apple Software Update check because sucatalog is unchanged, installed Apple packages are unchanged and we recently did a full check.
Finishing...
Performing postflight tasks...
postflight stdout: Munkireport: Requesting ard_model
Munkireport: Requesting filevault_status
Munkireport: Requesting installhistory
Munkireport: Requesting munkireport
Munkireport: Requesting displays_info
Munkireport: Requesting inventory
Munkireport: Requesting disk_report
Munkireport: Requesting warranty
Munkireport: Requesting localadmin
Munkireport: Requesting directory_service
Munkireport: Requesting network
Munkireport: Requesting bluetooth
Munkireport: Need to update reportdata
Munkireport: Need to update ard_model
Munkireport: Need to update munkireport
Munkireport: Sending items
Munkireport: Server info: starting: reportdata
Server info: starting: munkireport
Munkireport: # Executing scripts in postflight.d
postflight stderr: ERROR: Munkireport: ERROR: Can't open /Library/Preferences/com.apple.RemoteDesktop.plist
Done.

@bochoven
Copy link
Contributor

Maybe its better to create /Library/Preferences/com.apple.RemoteDesktop.plist if it doesn't exist.

defaults write /Library/Preferences/com.apple.RemoteDesktop createdby munkireport

@bochoven bochoven added the bug label Jul 12, 2014
bochoven added a commit that referenced this issue Jul 20, 2014
@drpebcak
Copy link

Yeah I actually prefer the error, because then I know when something isn't how I expect it!
It doesn't halt the rest of the munki run, so it doesn't hurt anything!

@bochoven
Copy link
Contributor

Apparently it is not obligatory to have /Library/Preferences/com.apple.RemoteDesktop.plist configured. So it should not be considered an error if the file does not exist.

@jimrt
Copy link
Author

jimrt commented Jul 21, 2014

As a workaround, I have removed the install.sh script for this module to prevent it from being deployed in our environment.

The error is problematic for us. When I see a large number of errors reported on the dashboard, my first concern is that there is an issue with one our software deployments. Only after some digging can we see that the error is just a harmless message about a missing preference file. It's not a huge deal, and it does not impact the functionality of Munki, but I filed this as an issue because others may start seeing these 'false alarms' as well.

@bochoven
Copy link
Contributor

If you only want to install certain modules, you can list them in config.php:

$conf['modules'] = array('disk_report', 'inventory', etc.);

see also config_default.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants