Checking network status as .mpkg requirement
Checking network status as .mpkg requirement
- Subject: Checking network status as .mpkg requirement
- From: Chris Adamson <email@hidden>
- Date: Fri, 29 Jan 2010 10:39:31 -0500
Building an .mpkg with PackageMaker...
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? Is there a better way to do an up-front network check? I searched the list and the devforum with a couple different search terms and didn't find any prior discussion of this.
Thanks in advance.
--Chris
_______________________________________________
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