Better detection in pkg distribution if the launchd pkg needs to be installed. Thanks to Pepijn Bruienne for the assist.

This commit is contained in:
Greg Neagle
2015-11-18 19:47:43 -08:00
parent cbe21d36ff
commit 466c1716df
+11 -1
View File
@@ -469,6 +469,16 @@ cat > "$DISTFILE" <<EOF
<title>Munki - Managed software installation for OS X</title>
<options customize="allow" allow-external-scripts="no"/>
<domains enable_anywhere="true"/>
<script>
function needsInstalled()
{
var action = my.choice.packageUpgradeAction;
if (action == 'installed') {
return false;
}
return true;
}
</script>
<choices-outline>
<line choice="core"/>
<line choice="admin"/>
@@ -485,7 +495,7 @@ cat > "$DISTFILE" <<EOF
<choice id="app" title="$APPTITLE" description="$APPDESC">
<pkg-ref id="$PKGID.app"/>
</choice>
<choice id="launchd" title="$LAUNCHDTITLE" description="$LAUNCHDDESC" start_selected='system.env.OS_INSTALL == 1 || system.compareVersions(my.target.receiptForIdentifier("$PKGID.launchd").version, "$LAUNCHDVERSION") != 0'>
<choice id="launchd" title="$LAUNCHDTITLE" description="$LAUNCHDDESC" start_selected='my.choice.packageUpgradeAction != "installed"'>
<pkg-ref id="$PKGID.launchd"/>
</choice>
$CONFCHOICE