This is a lot more robust and handles errors a lot better. It also cleans
up stray, hopeless, or unmodified files rather than leaving them there
forever.
. crate the symlink for /dev/log if required, then
. remove the old socket (savecore might have already created it
accidentally), then
. start syslogd.
(Btw., our test(1) misses an option to test for a socket.)
- split the "starting network daemons" in half.
- The first half starts things necessary to get full name service up.
- The quota check etc moved from "before network" to after the name
services are running. quotacheck does a while(p=getpwent()) which
isn't real good without YP running...
- moved rwhod a little later to put it with the other network stuff.
- deferred inetd a tad so that it's after ldconfig and dev_mkdb,
otherwise you get logins before you're ready.
Unresolved: named is started before ypserv/ypbind still, but named does
a while(s = getservent()) and while (p=getprotoent()) to suck in the
entire database into memory. This means you cannot have a "+" in the
/etc/services or /etc/protocols files or you get a long hang at boot.
Reviewed by: phk
Submitted by: Tatsumi Hosokawa <hosokawa@mt.cs.keio.ac.jp> & BSD Nomads
I re-wrote alot of this, but the ideas are based on the code from the
most recent pccard-snapshot.
While I'm at it, add a commented-out sample amd flags line to sysconfig
and drop a sample amd.map file in this directory for easy copying.
I know that this file's contents are highly site-variable, but the one I've
chosen for an example is also the one I've seen on 99.9% of the amd-using
sites I've visited. I think it's a fair default.
directories to check in looking for port startup scripts. The specific gunge
for apache httpd, gated and pcnfsd in /etc/sysconfig and /etc/netstart is
gone now. Note that pcnfsd's troubles aren't necessarily over (and probably
why NetBSD brought it into their sources) - anyone adding pcnfsd will STILL
have to tweak /etc/sysconfig in order to set the new variable
`weak_mountd_authentication' to YES. The flags to mountd are directly affected
by pcnfsd's requirements for non-root mounts, unfortunately! :-(
Submitted by: paul & jkh
in FreeBSD and should never have got in here.
Removed hard-coded /etc/rc.local.d hacks and implemented a more flexible
solution.
Added a local configuration area to sysconfig.
don't like it, they don't have to use it. The check makes sure that
/etc/rc.local.d exists before attempting to do anything with it. Now
packages will be able to add their startups as /etc/rc.local.d/<pkgname>.sh
in order to get local startup behavior. Maybe we can stop adding
knobs to /etc/sysconfig for ports/packages now?
Submitted by: wollman & jkh
Add nis_ypsetflags sysconfig entry and appropriate code in rc to call
ypset if needed. Should probably automatically add `-ypsetme' to ypbind
flags if this is set.
have non-critical nfs volumes in /etc/fstab they should have option bg
on them. The behavior of the system is more tuneable this way, and
allows a slow mounting /usr over nfs to work.
Submitted by: bde
when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.
Reviewed by: Poul-Henning Kamp, Rod Grimes
Have netstart directly source sysconfig so that it stands on its own.
Do not source netstart in rc, run it with sh.
Rework the dangerous /etc/hostname.* so that it uses a variable with
a list of interfaces and a variable for each interface in that list.
The files /etc/hostname.* become obsolete with this change, the
information is now stored in /etc/sysconfig.
Source any /etc/start_if.${ifn} files so they can export things to
netstart (plans for future enhancements in this area.)
Obsolete /etc/defaultrouter, this is now down with $defaultrouter from
sysconfig.
changes to it based upon other outstanding bug reports and commits made
after his work.
Comments:
(a) sysconfig is still used to do all configuration. I was not going to
change that out from under you.... a user never need edit netstart
or rc* unless they're being very weird.
(b) rc.maint has been folded back into rc. It is just unworkable as
a separate chunk because of ordering bogosities
(c) netstart does what it says... it starts up enough of the network to
get up, it doesn't start every bloody daemon that might talk to a
socket... netstart ifconfig's the devices and sets up routing if
configured to do so.
(d) nfs disks are mounted immediately after netstart completes
(e) syslog is started as early as possible (right after nfs) so that error
messages can get logged to remote syslog servers properly
(f) named is started (there is an argument that says that named should be
started before syslogd because if you are the dns server for your domain,
you'd like named to resolve remote hosts in syslog.conf, but this is
a minority case and the trivial workarround is to put the syslog host
in /etc/hosts or use an /etc/resolv.conf -- why? because you want syslog
to catch named errors, which is a MUCH more important and likely occurance)
(g) NOW all of the rest of the network daemons such as the time stuff, RPC,
NIS, NFS, Kerberos and inetd are started
(h) the rest of the generic stuff is done (cron/printer/sendmail)
(i) shared libraries are set
(j) /etc/rc.i386 is run (this does FreeBSD/386 specific stuff like ibcs2,
xtend, and all of the syscons stuff
(this is actually started as /etc/rc.`uname -m`
(k) the syscons stuff has gotten a serious cleaning to make it consistent
with rc conventions
(l) rc.local has had the comments about syscons removed (they are not relevant
to this file now) and the full name of the kernel has been restored to
/etc/motd
Submitted by: pts