• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Distribution script checking for files or package receipt?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distribution script checking for files or package receipt?


  • Subject: Distribution script checking for files or package receipt?
  • From: Shay Telfer <email@hidden>
  • Date: Wed, 11 Jul 2007 01:46:16 +0800

Hi...

I'd like my distribution script to check for either
/System/Library/StartupItems/MySQLCOM/MySQLCOM
or
/Library/StartupItems/MySQL/MySQL

(or alternatively, for the presence of a receipt of the MySQLStartupItem package).

The questions are:
* Why does the check for the files result in a Javascript error? (__choice_my_database_enabled returned error: (null))


* Alternatively, is there an 'approved' way to check for the receipt?

Thanks,
Shay

/* js:pkmk:start */
function MySQLStartupItemInstalled() {
	 return  mysqlStartupPackageInstalled() ;
}
/* js:pkmk:end */


/* js:pkmk:start */
function mysqlStartupPackageInstalled() {
var result = false;
try {
result = system.files.fileExistsAtPath('/System/Library/StartupItems/MySQLCOM/MySQLCOM') == true || system.files.fileExistsAtPath('/Library/StartupItems/MySQL/MySQL') == true;
} catch (e) {}


if(!result) {
my.result.type = 'Fatal';
my.result.title = 'MySQL Startup Package missing';
my.result.message = 'You must install the MySQL Startup Package from the MySQL installation';
}
return result;
}
/* js:pkmk:end */



/* ******* DO NOT EDIT ANYTHING BELOW THIS LINE ******* */ /* THE TEXT BELOW IS THE DEFINITION FOR THE REQUIREMENTS EDITOR */

/*
%%%Requirements Editor%%%
{
clauses = (
{
anyOrAll = 1;
connector = "";
msg = "You must install the MySQL Startup Package from the MySQL installation";
msgTitle = "MySQL Startup Package missing";
rules = (
{
argumentField = "";
argumentStringField = "";
booleanType = true;
choiceProperty = enabled;
comboType = "";
comparator = "==";
mainChoice = "File Exists";
numberType = "";
pathField = "/System/Library/StartupItems/MySQLCOM/MySQLCOM";
pathKeyKeyField = "";
pathKeyPathField = "";
specificChoice = choice0;
stringType = "";
},
{
argumentField = "";
argumentStringField = "";
booleanType = true;
choiceProperty = enabled;
comboType = "";
comparator = "==";
mainChoice = "File Exists";
numberType = "";
pathField = "/Library/StartupItems/MySQL/MySQL";
pathKeyKeyField = "";
pathKeyPathField = "";
specificChoice = choice0;
stringType = "";
}
);
title = "MySQL Startup Package installed";
type = 3;
}
);
functionName = MySQLStartupItemInstalled;
}
%%%Requirements Editor%%%
*/
--
=========================== Shay Telfer ================================
Perth, Western Australia Technomancer The love of liberty is the love
Opinions for hire [POQ] of others; the love of power is
http://newtonslore.com/ fnord the love of ourselves - Hazlitt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: RE: "Installation Failed" - Figuring out why
  • Next by Date: Distribution script in Apple Software Update
  • Previous by thread: RE: "Installation Failed" - Figuring out why
  • Next by thread: Distribution script in Apple Software Update
  • Index(es):
    • Date
    • Thread