Re: Checking network status as .mpkg requirement
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:in-reply-to :references:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=RCaRCdNjNGPuZgAt1HTChkwtRPiK00TWcrdpkawct7U=; b=AyWTyLcQs+p8MrImNypa/hhex2OhWwzZSeiH8pnT20z6rgYrH9V27y+dAOp8tZDNva toUeG+NjWYjP19cFs8j02EKgS+l07UXyy1vUrhkh1rpzOicvjFFrntUoNfgFAU3xX80s GI3ZVfqiSi0Tw2l0JyWLxxUyA+8oinb6Aotb8= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=iWLFPAHXi3d3u0T1UUdn/ZEsnvZK9RZon46y28TbAU9cYcHOuvVYTTV3owZKwVNXIz aZpt/Jh5UYyBXbouAbl3c/+Mo6Jg5f4Ek8eBUABhY+bImN+T+sUBl5XMm+MCOPtgNqsk Gt63IzqMEfPDZ+87tC9zwud2QLU2issP4ITpw= On Jan 29, 2010, at 4:39 PM, Chris Adamson wrote: Building an .mpkg with PackageMaker... Not reading the documentation for system.run . ------- run run(programName, args...) <--------------------------- Parameters programName Name of the program to execute. args... Arguments passed to the program. <------------------- Return Value Discussion Availability Available in Mac OS X v10.4 and later. ------- 2 notes: _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... I'm trying to do an up-front check for network connectivity, as I have an installer plug-in that does a network authentication step, and I don't want the user to have to progress through a read-me and EULA if they're only going to fail to connect to the authentication server later on. For the individual .mpkgs, PackageMaker will copy external scripts into the bundle, but that doesn't seem to be an option for the "Requirements" of the distribution object, which seems to work only with absolute paths. So I've tried to create the following requirement: require: true: result of script: with the following values in the sheet: if -> result of script file path -> /sbin/ping -c 2 -W 5000 www.subfurther.com The problem I'm seeing is that this rule always fails. Inverting the "pass" flag from "true" to "false" doesn't seem to matter. When I open up the distribution.dist file in the .mpkg, I see the following line: if(!(system.run('/sbin/ping -c 2 -W 5000 www.subfurther.com') == true)) { whether or not the pass flag is set to "true" or "false". So, I'm not really switching on the result of the ping at all. Can anyone tell me the obvious stupid mistakes I'm making? Launches a given program in the Resources directory of the installation package. After the program is executed, its exit code. If the program is not executed (see discussion), undefined. The allow-external-scripts attribute of the options element in the distribution definition must be 'yes' for the program to be launched. And, the Installer application asks the user’s permission before launching the program. See Distribution Definition Reference for more information. - I would be surprised if a command line tool or script shell ever returns true or false as is. I would rather compare with 0. - There's a typo in the documentation for the runOnce method, the example should read runOnce(programName, args...) and not run (programName, args...). This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev