Start Me Up: Writing and Understanding OS X StartupItems
Subject:   RunService
Date:   2003-10-24 16:01:40
From:   anonymous2
A minor nit.. but I don't believe the following statement is quite correct:

"When called with a single argument, RunService will run the function named "Argument"Service. For instance if you were to execute:
RunService "go";
it would execute the function named "GoService". "

If you look at the RunService function found in /etc/rc.common you'll find that it's actually a case statement that specifically looks for the arguments "start", "stop" or "restart" and then calls "StartService", "StopService" or "RestartService" respectively. Any other parameter will be treated as an unknown argument.

So you can't arbitrarily set up any function name (say "FooService") in your startup script and expect
RunService "Foo"
to call it.


1 to 2 of 2
1 to 2 of 2