tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Conditional rc.d scripts? / launchd port: Worth it?
Greg Troxel <gdt%ir.bbn.com@localhost> wrote:
|'do the right thing with the network' daemon. The devil is in making it
|sane and not annoying.
i never really (tried Apple, but practically work with 8 open
terminal windows, and that .app is buggy) got launchd right:
..
if ifconfig ${IFACE} | grep inet >/dev/null 2>&1; then
...
while [ 2 -gt "`ifconfig ${IFACE} | \
awk 'BEGIN {i=0} /inet/{++i} END {print i}'`" ]; do
echo "Not all addresses assigned to ${IFACE} yet"
sleep 1
done
sleep 5 # LaunchDaemon is stupid
^^^
without this sleep i'll sometimes get a pop-up "network
address is already in use", whatever this means
... (ipfw(8) setup)
sleep 10 # LaunchDaemon is stupid
^^^
without this sleep the script is (most often, practically
always) invoked twice when the interface comes up;
interestingly that doesn't happen with this sleep.
Say - isn't that shit?
..and luckily someone else was so nice and posted an actually
working LaunchAgent XML configuration file.
So i really don't know, there must be better solutions to get
Mac OS X going (i hope).
|This was kind of gross, but worked well enough that I didn't do more.
--steffen
Home |
Main Index |
Thread Index |
Old Index