Re: Confused about connection between an option in rc.conf and the associated action?

[email protected] 13 Mar 2005 00:34:01 -0500
Newsgroups gmane.os.freebsd.newbies
Message-ID <[email protected]>
On Sat, Mar 12, 2005 at 09:46:39PM -0500, Ronny Hippler wrote:
> On Sat, 12 Mar 2005 19:15:18 -0700, Sancho2k.net Lists wrote:
> 
> >Having said that, I can't see where sshd_enable is used anywhere on my 
> >system, although OpenSSH starts at boot...
> 
> after ploding through the files in etc I have come to the conclusion
> that init (which is run @ boot) starts many scripts in there named
> rc.????. ssh is started by rc.network if I am guessing correctly.

I think init just runs /etc/rc on bootup; I'm not sure, but that's certainly
one of the things it does.

In any case, /etc/rc then runs each of the scripts in /etc/rc.d:

	files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`

	for _rc_elem in ${files}; do
		run_rc_script ${_rc_elem} ${_boot}
	done

It seems that the scripts in /etc/rc.d then look at the various configuration
files.

For example, /etc/rc.d/sshd will only actually start sshd if the sshd_enable
option is set in /etc/rc.conf.  rc.conf doesn't do anything itself; it merely
contains options that other scripts read.

- James Cook
  [email protected]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-newbies
To unsubscribe, send any mail to "[email protected]"