Javascript: What's supposed to be the best way to check a Mac OS X distribution is Mac OS X Server?
Javascript: What's supposed to be the best way to check a Mac OS X distribution is Mac OS X Server?
- Subject: Javascript: What's supposed to be the best way to check a Mac OS X distribution is Mac OS X Server?
- From: Iceberg-Dev <email@hidden>
- Date: Sun, 12 Oct 2008 01:40:02 +0200
So far I have found these 3 ways:
(1) Simple
if (my.target.systemVersion!=undefined)
{
if (system.files.fileExistsAtPath(my.target.mountpoint + "/System/
Library/CoreServices/ServerVersion.plist")==false)
{
/* not a server */
}
}
(2) A bit better (used by Apple in some distribution script)
if (my.target.systemVersion!=undefined)
{
var tServerVersionDict;
tServerVersionDict = system.files.plistAtPath(my.target.mountpoint +
"/System/Library/CoreServices/ServerVersion.plist");
if (! tServerVersionDict)
{
/* not a server */
}
/* Could be improved by checking the required keys are there */
}
(3) undocumented but used by Apple
if (my.target.systemVersion!=undefined)
{
if (my.target['systemVersion'].isServer==false)
{
/* not a server */
}
}
_______________________________________________
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