rcorder

Polytropon freebsd at edvax.de
Mon Dec 27 06:12:22 UTC 2010


On Mon, 27 Dec 2010 00:38:53 -0500, Nu 2 Da Boro <nu2daboro08 at gmail.com> wrote:
> I am trying to change the boot order for a service on my server... I have a
> service that boots before mysql and need to change this. I have read the man
> page for rc and rcorder and still unable to come up with a solution to my
> problem.

There are keywords that determine the order of execution,
those are especially REQUIRE and PROVIDE. You need to
set them in the rc.d/ scripts. For example, the script
that has to run first gets the proper PROVIDE setting,
the script that depends on the first script - the one
that should therefore be started _after_ the previous
service is up - gets the REQUIRE keyword. You can see
a better explaination in "man rcorder". See the rc.d/
files of your services.

E. g. /usr/local/etc/rc.d/mysql-server:

	# PROVIDE: mysql
	# REQUIRE: LOGIN
	# KEYWORD: shutdown

Depending on the service that mysql requires, you would
need to code something like

	# PROVIDE: bla

in this service's startup file, and then add

	# REQUIRE: bla

to mysql's startup file. The correct order of execution is
determined automatically by the rcorder mechanism.



> I'm pretty familiar with Ubunutu and the /etc/rc0-6 but I'm new to
> FreeBSD

FreeBSD does not have this kind of runlevel based startup.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list