rc.d scripts

Rick Apichairuk rick at logicmerc.com
Mon Mar 26 12:35:00 UTC 2007


> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org [mailto:owner-freebsd-
> questions at freebsd.org] On Behalf Of Jack Stone
> Sent: Sunday, March 25, 2007 8:09 AM
> To: freebsd at voidmain.net; questions at freebsd.org
> Subject: RE: rc.d scripts
> 
> >From: Tom Grove <freebsd at voidmain.net>
> >To: questions at freebsd.org
> >Subject: rc.d scripts
> >Date: Fri, 23 Mar 2007 09:15:29 -0400
> >
> >Does anyone know how to make a script in /etc/rc.d run last?  For instance
> >I want dhclient to be the last script in /etc/rc.d/ to run.  Any help is
> >much appreciated.
> >
> >-Tom
> 
> This may have already been answered by others, but I believe just rename the
> script with a prefix of "z" for example: "zmyscript.sh" or "zzmyscript" to
> make it very last beyond the first one with a "z".
> 
> It works for me.
> 

You might have also noticed that some ports come with number prefixed rc startup
scripts. You can prefix your scripts with numbers like:

01_apache.sh
02_mysql.sh
03_pgsql.sh

That way you can always adjust the exact order.

Best Regards,

Rick Apichairuk 



More information about the freebsd-questions mailing list