Package: atftpd
Version: 0.7.dfsg-11
Severity: wishlist
Tags: patch

Here is a patch to add support for the "status" action to the init.d
script of atftpd.
diff -u atftp-0.7.dfsg/debian/atftpd.init.d atftp-0.7.dfsg/debian/atftpd.init.d
--- atftp-0.7.dfsg/debian/atftpd.init.d
+++ atftp-0.7.dfsg/debian/atftpd.init.d
@@ -34,6 +34,8 @@
     exit 0;
 fi
 
+. /lib/lsb/init-functions
+
 # Make sure we have --daemon when not using inetd
 echo "$OPTIONS"|grep -q -- --daemon || OPTIONS="--daemon $OPTIONS"
 
@@ -55,9 +57,12 @@
 	start-stop-daemon --start --oknodo --quiet --exec $DAEMON -- $OPTIONS
 	echo "$NAME."
 	;;
+  status)
+	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+	;;
   *)
 	N=/etc/init.d/$NAME
-        echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+        echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
 	exit 1
 	;;
 esac
diff -u atftp-0.7.dfsg/debian/changelog atftp-0.7.dfsg/debian/changelog
--- atftp-0.7.dfsg/debian/changelog
+++ atftp-0.7.dfsg/debian/changelog
@@ -1,3 +1,9 @@
+atftp (0.7.dfsg-11.1) UNRELEASED; urgency=low
+
+  * Added support for "status" action to init script
+
+ -- Peter Eisentraut <[email protected]>  Tue, 18 Oct 2011 07:00:52 +0300
+
 atftp (0.7.dfsg-11) unstable; urgency=low
 
   * Fixed a potential DoS bug (introduced by the IPv6 patch)
diff -u atftp-0.7.dfsg/debian/control atftp-0.7.dfsg/debian/control
--- atftp-0.7.dfsg/debian/control
+++ atftp-0.7.dfsg/debian/control
@@ -17,7 +17,7 @@
 
 Package: atftpd
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, update-inetd
+Depends: ${shlibs:Depends}, ${misc:Depends}, update-inetd, lsb-base
 Recommends: inet-superserver
 Conflicts: tftpd
 Suggests: logrotate

Reply via email to