[Pkg-sysvinit-commits] r1117 - in sysvinit/trunk/debian: . sysv-rc/etc/init.d sysv-rc/man8
pere at alioth.debian.org
pere at alioth.debian.org
Wed Dec 26 15:38:05 UTC 2007
Author: pere
Date: 2007-12-26 15:38:05 +0000 (Wed, 26 Dec 2007)
New Revision: 1117
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/sysv-rc/etc/init.d/README
sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8
Log:
* Update sysv-rc documentation based on text and suggestions
from Alessandro Vesely (Closes: #382410).
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2007-12-26 13:27:19 UTC (rev 1116)
+++ sysvinit/trunk/debian/changelog 2007-12-26 15:38:05 UTC (rev 1117)
@@ -4,6 +4,8 @@
* Fix typo in fstab option parsing to detect kerberos with
NFSv4. (Closes: #416223)
+ * Update sysv-rc documentation based on text and suggestions
+ from Alessandro Vesely (Closes: #382410).
-- Petter Reinholdtsen <pere at debian.org> Tue, 25 Dec 2007 21:56:44 +0100
Modified: sysvinit/trunk/debian/sysv-rc/etc/init.d/README
===================================================================
--- sysvinit/trunk/debian/sysv-rc/etc/init.d/README 2007-12-26 13:27:19 UTC (rev 1116)
+++ sysvinit/trunk/debian/sysv-rc/etc/init.d/README 2007-12-26 15:38:05 UTC (rev 1117)
@@ -30,3 +30,6 @@
* /etc/init.d/*.sh scripts must conform to the rules for sh scripts as
spelled out in the Debian policy section entitled "Scripts" (§10.4).
+
+Use the update-rc.d command to create symbolic links in the /etc/rc?.d
+as appropriate. See that man page for more details.
Modified: sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8
===================================================================
--- sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8 2007-12-26 13:27:19 UTC (rev 1116)
+++ sysvinit/trunk/debian/sysv-rc/man8/update-rc.d.8 2007-12-26 15:38:05 UTC (rev 1117)
@@ -117,18 +117,25 @@
.B Default-Stop
fields in that header are used instead.
By default all the links will have sequence number 20, but
-this can be overridden by supplying one
-.I NN
-or two
-.I SS
-and
-.I KK
-arguments;
-a single argument overrides the sequence number
-for both start and stop links
-whereas a pair of arguments overrides the sequence numbers
-for start and stop links, respectively.
+this should be overridden if there are dependencies. For example if
+daemon B depends on A, then A must be started before B and B must be
+killed before A. You accomplish this by supplying two NN arguments. In
+general, core daemons should start early and be killed late, whilst
+applications can start late and be killed early. See EXAMPLES below.
.P
+The first NN argument supplies the start sequence number and
+the second NN argument supplies the kill sequence number.
+Kill scripts are called first, passing a stop argument. Then
+start scripts are called passing a start argument. In either
+case, calls happen in ascending sequence number order.
+.P
+Supplying a single NN argument will use the same number for
+both start and kill links. This is supported for backward
+compatibility but is discouraged, as it may lead to inconsistent
+settings. As a rule of thumb, if you increase the start sequence
+number you should also decrease the stop sequence number, and
+vice-versa.
+.P
As a rule of thumb, the sequence number of the stop link
should be 100 minus the sequence number of the start link;
this causes services to be stopped in the opposite order
@@ -220,6 +227,21 @@
.nf
.B " update-rc.d foobar start 30 2 3 4 5 . stop 70 0 1 6 ."
.fi
+Insert links at default runlevels when B requires A
+.nf
+.B " update-rc.d script_for_A defaults 80 20"
+.B " update-rc.d script_for_B defaults 90 10"
+.fi
+Insert a link to a service that (presumably) will not be
+needed by any other daemon
+.nf
+.B " update-rc.d top_level_app defaults 98 02"
+.fi
+Insert links for a script that requires services that
+start/stop at sequence number 20
+.nf
+.B " update-rc.d script_depends_on_svc20 defaults 21 19"
+.fi
Remove all links for a script (assuming foobar has been deleted
already):
.nf
More information about the Pkg-sysvinit-commits
mailing list