Package:  genpower
Version:  1.0.5-1
Tags:     patch
User:     [EMAIL PROTECTED]
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 genpower-1.0.5.orig/debian/genpower.rc 
genpower-1.0.5/debian/genpower.rc
--- genpower-1.0.5.orig/debian/genpower.rc      2004-01-18 05:23:10.000000000 
+0100
+++ genpower-1.0.5/debian/genpower.rc   2008-02-17 10:42:39.000000000 +0100
@@ -1,4 +1,11 @@
 #! /bin/sh
+### BEGIN INIT INFO
+# Provides:          genpower
+# Required-Start:    $remote_fs
+# Required-Stop:     $remote_fs
+# Default-Start:     1 2 3 4 5
+# Default-Stop:
+### END INIT INFO
 #
 # genpower     This script is used to start the UPS management daemon.  When
 #              called with "poweroff", this script will attempt to shutdown
diff -ur genpower-1.0.5.orig/debian/powerfail.rc 
genpower-1.0.5/debian/powerfail.rc
--- genpower-1.0.5.orig/debian/powerfail.rc     2004-01-18 05:43:47.000000000 
+0100
+++ genpower-1.0.5/debian/powerfail.rc  2008-02-17 10:39:10.000000000 +0100
@@ -1,4 +1,11 @@
 #! /bin/sh
+### BEGIN INIT INFO
+# Provides:          powerfail
+# Required-Start:    $remote_fs
+# Required-Stop:     $remote_fs
+# Default-Start:     1 2 3 4 5
+# Default-Stop:
+### END INIT INFO
 #
 # powerfail      This script is run when the UPS tells the system that the
 #                power has gone.  Tell everybody and start the shutdown based

The header patch reflect the current configuration in the package.  It
seem strange to me to start the daemon in single user (runlevel 1),
and to insert two copies of the genpower script (using the symlink
ups-monitor).  The symlink will not be properly handled by dependency
based boot sequencing, as it will provide genpower and not
ups-monitor.  Is it really needed?  If not, perhaps it is better to
remove the symlink?  Also, I would recommend not starting the daemons
in runlevel 1.

Happy hacking,
--
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to