Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Nov 1999 18:21:27 -0800
From:      William Richard <wdr@tdl.com>
To:        Marc Wandschneider <MarcW@Lanfear.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: /etc/rc.local vs /usr/local/etc/rc.d/
Message-ID:  <38278527.27327BBB@tdl.com>
References:  <13D5F9EDFD72D211BC3100105A1C223305498B@akira.lanfear.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Marc Wandschneider wrote:
 
>         so, I'm trying to set up xdm.  I've looked on the
> FreeBSD-questions archive on www.freebsd.org, and it suggests that i put
> a few lines of code in:
> 
>         1. /etc/rc.local
>         OR
>         2. /usr/local/etc/rc.d
> 
>         Problem is, i have neither of these files.

/etc/rc.local is a file which the rc script pulls in during system
startup or when going multi-user after a single-user session. 
/usr/local/etc/rc.d is a directory which (might) contain shell scripts
run at startup time.

The Powers That Be discourage administrators from modifying any of the
rc.* files (except for rc.conf, and even this is largely maintained by
/stand/sysinstall now).  If you need to run something at startup that
doesn't have its own line in an rc.* file, rc.local or shell scripts in
/usr/local/etc/rc.d is the place to do it.

>         Should I create them?  Is there some new location that has
> superseded these?  If I create these, how can I be sure they're
> executed?

Grep for "rc.local" and "local_startup" in your /etc/rc file. 
/usr/local/etc/rc.d is defined in /etc/defaults/rc.conf (which is just a
long list of environment variable definitions).

After you make your changes, look for a "Starting local daemons:" line
in the rc output (before the login: prompt).  You can insert echo
statements after each line if you want to verify the commands as they
run, like this:

	/usr/X11R6/bin/xdm ; echo "Starting xdm"

On my machine, I use /etc/rc.local; it's just easier.

Cheers,
William Richard
wdr@tdl.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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