Re: [PATCH] Simple parallellized boot sequence (and a plea for LSB complience)
On Mon, Aug 22, 2005 at 12:59:49PM +0200, Marc Haber wrote:
> On Mon, 22 Aug 2005 09:32:48 +0200, Petter Reinholdtsen
> <email@example.com> wrote:
> >Yeah, me too. I've seen incorrect init.d ordering several times. And
> >to be able to detect and fix incorrect boot order, we need to know
> >dependencies. I hope as many as possible will add dependency
> >information using the LSB init.d headers. I've started doing it with
> >my packages.
> How about a recipe for doing so?
Good idea. Here is a quick and dirty draft based on my current
understanding. It is based on the content in
I recommend to read it if you want to know more.
Add a block like this in the init.d script (example based on
### BEGIN INIT INFO
# Provides: xdebconfigurator
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Generate xfree86 configuration at boot time
# Description: Preseed X configuration and use dexconf to
# generate a new configuration file.
### END INIT INFO
All sections except the description-sections are space separate lists.
Provides should list the name of this service, normally the script
name but might also list the name of services it "replaces".
Required-Start are services needed to start this service. These
services must start before this service. Required-Stop are services
used by this service, and this service should stop before the listed
services are stopped.
Should-Start are services that if present should start before this
service, but this service can start if the listed services are
missing. Should-Stop are services that if present should be stopped
after this service.
Default-Start is the run levels where this service should be started
by default, and Default-Stop is the run levels where this service
should be stopped by default.
Description and short-description are fairly obvious.
For dependency tracking, the required-* and should-* are important,
and the rest is unused. The default runlevels are used by insserv to
keep track of which rc#.d directory to update when a service is added
for the first time, and should reflect the intent of the service.
There are some "virtual"/system service names, listed in
$local_fs all local filesystems are mounted
$network low level networking (ethernet card; may imply PCMCIA running)
$named daemons which may provide hostname resolution (if present) are
running. For example, daemons to query DNS, NIS+, or LDAP.
$portmap daemons providing SunRPC/ONCRPC portmapping service as
defined in RFC 1833 (if present) are running all remote
$remote_fs filesystems are mounted. In some LSB run-time
environments, filesystems such as /usr may be
remote. Many applications that require $local_fs will
probably require also require $remote_fs.
$syslog system logger is operational
$time the system time has been set, for example by using a
network-based time program such as ntp or rdate, or via
the hardware Real Time Clock.