Changing policy to adjust for dependency based boot sequencing
Petter Reinholdtsen
pere at hungry.com
Tue Sep 22 12:06:21 UTC 2009
There is a section of policy that need to be adjusted to reflect the
new dependency based boot sequencing. Anyone got time to work on
this, to come up with a replacement text and guide the change through
the policy change process?
This is the part that need to change, from
<URL:http://www.debian.org/doc/debian-policy/ch-opersys.html>:
9.3.3 Interfacing with the initscript system
Maintainers should use the abstraction layer provided by the
update-rc.d and invoke-rc.d programs to deal with initscripts in their
packages' scripts such as postinst, prerm and postrm.
Directly managing the /etc/rc?.d links and directly invoking the
/etc/init.d/ initscripts should be done only by packages providing the
initscript subsystem (such as sysv-rc and file-rc).
__________________________________________________________________
9.3.3.1 Managing the links
The program update-rc.d is provided for package maintainers to arrange
for the proper creation and removal of /etc/rcn.d symbolic links, or
their functional equivalent if another method is being used. This may
be used by maintainers in their packages' postinst and postrm scripts.
You must not include any /etc/rcn.d symbolic links in the actual
archive or manually create or remove the symbolic links in maintainer
scripts; you must use the update-rc.d program instead. (The former will
fail if an alternative method of maintaining runlevel information is
being used.) You must not include the /etc/rcn.d directories themselves
in the archive either. (Only the sysvinit package may do so.)
By default update-rc.d will start services in each of the multi-user
state runlevels (2, 3, 4, and 5) and stop them in the halt runlevel
(0), the single-user runlevel (1) and the reboot runlevel (6). The
system administrator will have the opportunity to customize runlevels
by simply adding, moving, or removing the symbolic links in /etc/rcn.d
if symbolic links are being used, or by modifying /etc/runlevel.conf if
the file-rc method is being used.
To get the default behavior for your package, put in your postinst
script
update-rc.d package defaults
and in your postrm
if [ "$1" = purge ]; then
update-rc.d package remove
fi
. Note that if your package changes runlevels or priority, you may have
to remove and recreate the links, since otherwise the old links may
persist. Refer to the documentation of update-rc.d.
This will use a default sequence number of 20. If it does not matter
when or in which order the init.d script is run, use this default. If
it does, then you should talk to the maintainer of the sysvinit package
or post to debian-devel, and they will help you choose a number.
For more information about using update-rc.d, please consult its man
page update-rc.d(8).
The update-rc.d manual page have been updated in unstable, but could
use some more work too. :)
Happy hacking,
--
Petter Reinholdtsen
More information about the initscripts-ng-devel
mailing list