Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2009 16:48:46 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Peter Steele <psteele@webmail.maxiscale.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: What order are options in rc.conf processed?
Message-ID:  <20090727214846.GX63413@dan.emsphone.com>
In-Reply-To: <B8A480488C0C6849826655761349EA431F6EB7@owa.webmail.maxiscale.com>
References:  <B8A480488C0C6849826655761349EA431F6EB7@owa.webmail.maxiscale.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090727214846.GX63413>