site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jun 2, 2006, at 12:14 PM, Andrew Gallatin wrote: Let's take my software as a concrete example. I maintain my company's HPC drivers and software on MacOSX. We have a start/stop script which we plug into the rc.d/init.d/blah startup scripts on the other *nixes we support, and which is warped into a startup item on MacOSX. This script basically does 2 things 2) Starts a fabric mapper which runs over the interconnect. My requirements are simple. I want to be called last, after networking and disks and all that stuff is available. What if they're not available at boot? What if they come online later? Depends on how robust you want to make the daemon. Cheers, davez _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 1) Loads the driver for the cluster interconnect I thought IOKit's matching system does this automatically for you? Does it not? I want the hostname to be more-or-less stable... That's out of Apple's control. You'll have to talk to your sysadmin if you want that. How does this fit into the launchd model? The easiest, but least robust thing to do is to use IOKitWaitQuiet() at the beginning of your main(). If your driver isn't loaded after that call returns, then take the lazy way out and call abort(). After that point, you'll need to use one of the SystemConfiguration framework APIs to do the moral equivalent of IOKitWaitQuiet() except for networking. I'm not an expert at that framework, otherwise I'd mention what API you need to use. After that, you're good to go just like you used to. If you wish to make your daemon robust, you'll register for callbacks for when your hardware shows up and probably more importantly, to monitor for network configuration changes and adjust the fabric as required. This email sent to site_archiver@lists.apple.com
participants (1)
-
Dave Zarzycki