Bug#542274: lprng: Incorrect runlevels and provides in init.d script
Package: lprng
Version: 3.8.A-1.1
Severity: important
Tags: patch
User: initscripts-ng-devel@lists.alioth.debian.org
Usertags: incorrect-runlevels incorrect-provides
With dependency based boot sequencing, I discovered what I believe is
a bug in the init.d script. The provides should be unique and
preferably the name of the script. The current one conflict with the
lpr script. Also the runlevel list do not match the arguments to
update-rc.d, it should start in runlevel 4, not stop.
<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 >.
This patch should solve the issue. Without it, the script will fail
to install because another script providing the same service already
is installed, and fail to start in runlevel 4. In addition to this
header change, some code in postinst is needed to remove the stop
symlink and add a start symlink in rc4.d during upgrades.
diff -ur lprng-3.8.A/debian/init.d lprng-3.8.A-pere/debian/init.d
--- lprng-3.8.A/debian/init.d 2009-08-18 20:50:23.000000000 +0200
+++ lprng-3.8.A-pere/debian/init.d 2009-08-18 20:51:42.000000000 +0200
@@ -1,10 +1,10 @@
#! /bin/sh -e
### BEGIN INIT INFO
-# Provides: lpd
+# Provides: lprng
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network
-# Default-Start: 2 3 5
-# Default-Stop: 0 1 4 6
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
# Short-Description: Start lpd to allow printing
# Description: lpd is the print daemon required for lpr to work properly.
# It is basically a server that arbitrates print jobs to printer(s).
Happy hacking,
--
Petter Reinholdtsen
Reply to: