Package: nfs-kernel-server
Version: 1:1.0.8-3
Severity: normal
Tags: patch
Heartbeat-2 requests LSB compliant init scripts (see
http://linux-ha.org/LSBResourceAgent).
In particular, it requires a 'status' command with given exit codes. Here's a
patch to add
such exit codes to /etc/init.d/nfs-kernel-server
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-em64t-p4-smp
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages nfs-kernel-server depends on:
ii libc6 2.3.6-7 GNU C Library: Shared libraries
ii nfs-common 1:1.0.8-3 NFS support files common to client
ii sysvinit 2.86.ds1-14.1 System-V-like init utilities
ii ucf 2.0010 Update Configuration File: preserv
nfs-kernel-server recommends no packages.
-- no debconf information
--- /etc/init.d/nfs-kernel-server.dpkg-dist 2006-06-03 11:21:53.000000000
+0200
+++ /etc/init.d/nfs-kernel-server 2006-06-07 11:33:37.000000000 +0200
@@ -10,7 +10,7 @@
# which is configured via the /etc/exports file.
#
-set -e
+#set -e
# What is this?
DESC="NFS kernel daemon"
@@ -122,6 +122,19 @@
echo "done."
;;
+ status)
+ if [ "$(ps -A | grep -e nfsd)" ]
+ then
+ echo "nfsd running"
+ exit 0
+ else
+ echo >&2 "nfsd not running"
+ exit 3
+ fi
+ ;;
+
+
+
reload | force-reload)
printf "Re-exporting directories for $DESC..."
$PREFIX/sbin/exportfs -r
@@ -135,7 +148,7 @@
;;
*)
- echo "Usage: nfs-kernel-server {start|stop|reload|force-reload|restart}"
+ echo "Usage: nfs-kernel-server
{start|stop|status|reload|force-reload|restart}"
exit 1
;;
esac