Package: quota
Version: 3.17-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: initd-status-support

Here is a patch to support the "status" action in the init.d script.  Please 
double-check it.
diff -u quota-3.17/debian/quotarpc quota-3.17/debian/quotarpc
--- quota-3.17/debian/quotarpc
+++ quota-3.17/debian/quotarpc
@@ -62,8 +62,11 @@
 	$0 stop
 	$0 start
 	;;
+  status)
+	status_of_proc $DAEMON quotarpc
+	;;
   *)
-	echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+	echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
 	exit 1
 	;;
 esac
diff -u quota-3.17/debian/quota.init quota-3.17/debian/quota.init
--- quota-3.17/debian/quota.init
+++ quota-3.17/debian/quota.init
@@ -118,8 +118,17 @@
 	$0 stop
 	$0 start
 	;;
+  status)
+	if LC_MESSAGES=C $on -ap | grep -q "is off"; then
+		log_failure_msg "quota is off"
+		exit 3
+	else
+		log_success_msg "quota is on"
+		exit 0
+	fi
+	;;
   *)
-	echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+	echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
 	exit 1
 	;;
 esac
diff -u quota-3.17/debian/control quota-3.17/debian/control
--- quota-3.17/debian/control
+++ quota-3.17/debian/control
@@ -7,7 +7,7 @@
 
 Package: quota
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 1.2.9) | debconf-2.0, lsb-base (>= 3.0-3)
+Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 1.2.9) | debconf-2.0, lsb-base (>= 3.2-13)
 Suggests: libnet-ldap-perl, portmap
 Description: implementation of the disk quota system
  QUOTA is implemented using the BSD system call interface as the means of

Reply via email to