[Pkg-puppet-devel] Bug#462915: puppet/puppetmaster: Please add LSB formatted dependency info in init.d script

Petter Reinholdtsen pere at hungry.com
Mon Jan 28 07:54:28 UTC 2008


Package:  puppet puppetmaster
Version:  0.20.1-1
Tags:     patch
User:     initscripts-ng-devel at lists.alioth.debian.org
Usertags: missing-dependency

To be able to check boot script order, and also to be able to start
boot scripts in parallel, it is important to know the dependencies of
the various boot scripts.  The Linux Software Base specifies a init.d
header file format useful for this purpose, and adding such header to
the anacron init.d script would make it possible for me to use this
information to check the current sequence and to speed up the debian
boot.

I am working on a system to update the boot sequence based on these
dependencies, and would like see this as the default in Lenny.
Because of this, it is nice if the dependencies was updated quickly.

<URL:http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/initscrcomconv.html>
documents the LSB header format.  Some debian notes are available from
<URL:http://wiki.debian.org/LSBInitScripts>.

Here is a patch to document the dependencies.  I hope this is correct.

diff -ur puppet-0.24.1.orig/debian/puppet.init puppet-0.24.1/debian/puppet.init
--- puppet-0.24.1.orig/debian/puppet.init       2008-01-28 08:48:05.000000000 +0100
+++ puppet-0.24.1/debian/puppet.init    2008-01-28 08:51:36.000000000 +0100
@@ -1,4 +1,12 @@
 #! /bin/sh
+### BEGIN INIT INFO
+# Provides:          puppet
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Should-Start:      puppetmaster
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO

 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/puppetd
diff -ur puppet-0.24.1.orig/debian/puppetmaster.init puppet-0.24.1/debian/puppetmaster.init
--- puppet-0.24.1.orig/debian/puppetmaster.init 2008-01-28 08:48:05.000000000 +0100
+++ puppet-0.24.1/debian/puppetmaster.init      2008-01-28 08:51:15.000000000 +0100
@@ -1,4 +1,11 @@
 #! /bin/sh
+### BEGIN INIT INFO
+# Provides:          puppetmaster
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO

 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/puppetmasterd

As the stop script do not seem to do much except killing the daemon,
that task might be better left to the sendsigs script in runlevel 0
and 6, to speed up shutdown.  If this is indeed the case, I recommend
removing 0 and 6 from the Default-Stop list.

Happy hacking,
--
Petter Reinholdtsen





More information about the Pkg-puppet-devel mailing list