• 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
Javascript: What's supposed to be the best way to check a Mac OS X distribution is Mac OS X Server?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Javascript: Missing information about OS version checking
  • Next by Date: Javascript: choices / A typo in the documentation
  • Previous by thread: Javascript: Missing information about OS version checking
  • Next by thread: Javascript: choices / A typo in the documentation
  • Index(es):
    • Date
    • Thread