Package: apt-cacher
Version: 1.7.1
Severity: wishlist
Tags: patch

Here is a patch to add support for the "status" action to the init.d
script of apt-cacher.
diff -Nru apt-cacher-1.7.1/debian/apt-cacher.init apt-cacher-1.7.1+nmu1/debian/apt-cacher.init
--- apt-cacher-1.7.1/debian/apt-cacher.init	2011-09-27 16:59:23.000000000 +0300
+++ apt-cacher-1.7.1+nmu1/debian/apt-cacher.init	2011-11-08 06:15:20.000000000 +0200
@@ -27,6 +27,8 @@
 	. /etc/default/$NAME
 fi
 
+. /lib/lsb/init-functions
+
 #
 #	Function that starts the daemon/service.
 #
@@ -78,8 +80,11 @@
 	    kill -HUP $pid
 	fi
 	;;
+  status)
+	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+	;;
   *)
-	echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
 	exit 1
 	;;
 esac
diff -Nru apt-cacher-1.7.1/debian/changelog apt-cacher-1.7.1+nmu1/debian/changelog
--- apt-cacher-1.7.1/debian/changelog	2011-10-26 09:31:13.000000000 +0300
+++ apt-cacher-1.7.1+nmu1/debian/changelog	2011-11-08 06:16:03.000000000 +0200
@@ -1,3 +1,9 @@
+apt-cacher (1.7.1+nmu1) UNRELEASED; urgency=low
+
+  * Add support for "status" action to init.d script
+
+ -- Peter Eisentraut <pet...@debian.org>  Tue, 08 Nov 2011 06:15:47 +0200
+
 apt-cacher (1.7.1) unstable; urgency=low
 
   * Support multiple import directories for apt-cacher-import.pl.
diff -Nru apt-cacher-1.7.1/debian/control apt-cacher-1.7.1+nmu1/debian/control
--- apt-cacher-1.7.1/debian/control	2011-10-26 09:29:54.000000000 +0300
+++ apt-cacher-1.7.1+nmu1/debian/control	2011-11-08 06:15:44.000000000 +0200
@@ -9,7 +9,7 @@
 
 Package: apt-cacher
 Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libwww-curl-perl (>=4.00), libwww-perl, libfreezethaw-perl, ed, libio-interface-perl, libfilesys-df-perl, libnetaddr-ip-perl, update-inetd
+Depends: ${perl:Depends}, ${misc:Depends}, libwww-curl-perl (>=4.00), libwww-perl, libfreezethaw-perl, ed, libio-interface-perl, libfilesys-df-perl, libnetaddr-ip-perl, lsb-base, update-inetd
 Recommends: libberkeleydb-perl (>=0.34)
 Suggests: libio-socket-inet6-perl
 Description: Caching proxy for Debian package and source files

Reply via email to