Package:  apt-cacher
Version:  1.5.4
Severity: important
Tags:     patch
User:     [email protected]
Usertags: incorrect-dependency incorrect-runlevels

With dependency based boot sequencing, I discovered what I believe is
a bug in the init.d script. The dependencies are not correct.  The
daemon need /usr/ to be mounted, and thus need to depend on $remote_fs
both during boot and shutdown.  The dependency on mountall can be
dropped.  Also, the script should be stopped in runlevel 1.  The empty
Should-* headers are not needed and can be removed.

<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 init.d might start
to early in the boot sequence, and fail to stop in runlevel 1.

diff -ur apt-cacher-1.6.8/debian/apt-cacher.init 
apt-cacher-1.6.8-pere/debian/apt-cacher.init
--- apt-cacher-1.6.8/debian/apt-cacher.init     2009-02-05 00:53:53.000000000 
+0100
+++ apt-cacher-1.6.8-pere/debian/apt-cacher.init        2009-08-13 
21:12:31.000000000 +0200
@@ -3,12 +3,10 @@

 ### BEGIN INIT INFO
 # Provides:          apt-cacher
-# Required-Start:
-# Should-Start:      mountall
-# Required-Stop:
-# Should-Stop:
+# Required-Start:    $remote_fs
+# Required-Stop:     $remote_fs
 # Default-Start:     2 3 4 5
-# Default-Stop:      0 6
+# Default-Stop:      0 1 6
 # Short-Description: apt-cacher package caching proxy daemon
 # Description:       The apt-cacher service is used to cache packages for a 
system or LAN
 ### END INIT INFO

Happy hacking,
-- 
Petter Reinholdtsen



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

Reply via email to