Package: nfs-common 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-common -- 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-common depends on: ii adduser 3.87 Add and remove users and groups ii libc6 2.3.6-7 GNU C Library: Shared libraries ii libcomerr2 1.38+1.39-WIP-2006.04.09-2 common error description library ii libevent1 1.1a-1 An asynchronous event notification ii libgssapi2 0.9-2 A mechanism-switch gssapi library ii libkrb53 1.4.3-7 MIT Kerberos runtime libraries ii libnfsidmap1 0.13-1 An nfs idmapping library ii librpcsecgss2 0.12-1 allows secure rpc communication us ii portmap 5-19 The RPC portmapper ii sysvinit 2.86.ds1-14.1 System-V-like init utilities ii ucf 2.0010 Update Configuration File: preserv nfs-common recommends no packages. -- no debconf information
--- /tmp/nfs-common 2006-06-07 11:47:08.000000000 +0200 +++ /etc/init.d/nfs-common 2006-06-07 10:59:10.000000000 +0200 @@ -10,7 +10,7 @@ # -set -e +#set -e # What is this? DESC="NFS common utilities" @@ -193,6 +193,42 @@ echo "." ;; + status) + if [ "$(ps -A | grep -e rpc.statd)" ] + then + if [ "$NEED_GSSD" = yes ] + then + if [ ! "$(ps -A | grep -e rpc.gssd)" ] + then + echo "rpc.statd running, but rpc.gssd halted" + exit 3 + fi + fi + if [ "$NEED_LOCKD" = yes ] + then + if [ ! "$(ps -A | grep -e rpc.lockd)" ] + then + echo "rpc.statd running, but rpc.lockd halted" + exit 3 + fi + fi + if [ "$NEED_IDMAPD" = yes ] + then + if [ ! "$(ps -A | grep -e rpc.idmapd)" ] + then + echo "rpc.statd running, but rpc.idmapd halted" + exit 3 + fi + fi + echo "rpc.statd running" + exit 0 + else + echo >&2 "rpc.statd not running" + exit 3 + fi + ;; + + restart | force-reload) $0 stop sleep 1 @@ -200,7 +236,7 @@ ;; *) - echo "Usage: nfs-common {start|stop|restart}" + echo "Usage: nfs-common {start|stop|status|restart}" exit 1 ;; esac