[launchd-dev] LimitLoadToHosts doesn't work with RunAtLoad
Ian Eiloart
iane at sussex.ac.uk
Thu Jun 5 08:18:10 PDT 2008
Hi,
I have a cluster of mail servers, using Wackamole to ensure IP failover. I
start wackamole at startup, since it requires to be available all the time.
Actually, I require NetworkState to be true.
Each server has a different set of preferred IP addresses, so each requires
a different wackamole configuration file. I'm maintaining the software
using RADMIND, and the simplest thing to do is place all the files on all
the servers. I had hoped that launchd's LimitLoadToHosts key would help me
out here, so I created a plist file for each server.
The trouble is that adding the following key to the plist seems to stop the
service loading at startup, although it lets me load the service from the
command line. It works as expected on the other hosts, preventing loading
at any time.
<key>LimitLoadToHosts</key>
<array>
<string>snow.uscs.susx.ac.uk</string>
</array>
Is this a bug in launchd? Does it work with, for example, on demand
services?
My full (working) plist is here:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>/opt/local/lib</string>
</dict>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>
<key>Label</key>
<string>org.wackamole.snow</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/wackamole</string>
<string>-c</string>
<string>/opt/local/etc/wackamole.snow.conf</string>
<string>-d</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
--
Ian Eiloart
IT Services, University of Sussex
x3148
More information about the launchd-dev
mailing list