What order are options in rc.conf processed?

Dan Nelson dnelson at allantgroup.com
Mon Jul 27 21:48:48 UTC 2009

In the last episode (Jul 27), Peter Steele said:
> We have an rc.conf file that looks something like this:
> In a recent reboot test, when "ourapp" started, it checked to see if an IP
> was assigned to the system and there was not, causing it to take an
> unexpected logic path.  Our understanding though was that since we had an
> entry in rc.conf defining the IP then our app should have started after
> that IP was assigned.  Is this true or is there potentially a timing issue
> here?

rc.conf is just a script that sets a bunch of environment variables for the
/etc/rc.d/* scripts to use.  The order the variables are set in that file
does not matter.  If you want your script to run after network interfaces
are set up, you'll want to add a "REQUIRE: NETWORKING" line.  See the
rc and rcorder manpages for more info, and take a look at the files in
/etc/rc.d/ for examples.

	Dan Nelson
	dnelson at allantgroup.com

More information about the freebsd-questions mailing list