are some services that should be shut down in order
(e.g., database-using applications before their databases)
and some services that require more than SIGHUP for a
clean shutdown.
/etc/rc.wscons was added to control how the wscons
console driver was configured at boot time, and to allow
manual reconfiguration. /etc/wscons.conf controls this
behavior.
2.3.3. Summary prior to NetBSD 1.5
At multiuser boot, init calls /etc/rc to initialize the
system. /etc/rc calls /etc/netstart to setup network ser-
vices, /etc/rc.local for local services, /etc/rc.lkm to ini-
tialize load-able kernel modules, and /etc/rc.wscons to
configure the wscons console driver. The start-up of ser-
vices is controlled by variables in /etc/rc.conf.
At system shutdown time, shutdown calls /etc/rc.shut-
down to shut down specific services which have to be
shut down before the global SIGHUP that init sends.
3. Design considerations
Over a six year period, various ideas on how to enhance
the start-up system were floated on the public NetBSD
mailing lists ‘current-users’ and ‘tech-userlevel’, as well
as on the NetBSD developer-only mailing list.
There was no consensus on ‘OneTrueDesign’; there
was too much contention for that. What is described
below is an amalgamation of what a few developers felt
was a reasonable analysis of the problems and feedback
as well as the most reasonable solution to support the
widest variety of circumstances.
3.1. Problems with the old system
The old system was perceived to suffer from the follow-
ing problems:
• There was no control over the dependency ordering,
except by manually editing /etc/rc (and other
scripts) and moving parts around.
This caused problems at various times, in situations
such as workstations with remotely mounted /usr
partitions, and these problems weren’t completely
resolved as was seen by observing various mailing
discussions and a flurry of CVS commits to the
source tree.
• It was difficult to manually control an individual
service after the system booted (e.g., restart
dhcpd, shut down a database, etc).
Whilst some people suggested that a system admin-
istrator who couldn’t manually restart a service was
incompetent, this doesn’t resolve the issue that typ-
ing “/etc/rc.d/amd restart” is signifi-
cantly easier that finding the process identifier of
amd, killing it, examining /etc/rc for the syntax that
amd is invoked with, searching /etc/rc.conf for any
site-specific options, and manually typing in the
resulting command.
Unfortunately, there was a slight tendency during
some of the mailing list discussions to resort to
attacks on people’s competency in this manner. I
consider this a form of computer based intellectual
snobbery, and an unreasonable justification for why
that person disliked a feature.
• It didn’t easily cater for addition of local or third
party start-up mechanisms, especially addition into
arbitrary points in the boot sequence, including
those installed by (semi-)automated procedures
such as the NetBSD ‘pkg’ tools.
3.2. Requirements of the new system
Given the problems in the old system, and observations
of what other systems have done, including those
described in section 2, the following design consider-
ations were defined.
Some of these considerations were not determined dur-
ing discussion prior to implementation, but were identi-
fied once users were actively using the implementation.
3.2.1. Dependency ordering
Dependency ordering is a strong requirement.
The following dependency ordering requirements were
determined:
• Independence from lexicographical ordering of file-
names.
Some other systems (e.g., System V init.d) use an
existing lexicographical ordering of filenames in a
given directory, such as /etc/rc2.d/S69inet occurring
before /etc/rc2.d/S70uucp, but experience has
shown that this doesn’t necessarily scale cleanly
when adding local or third-party services into the