[Linux-ha-dev] Patch to SuSE /etc/init.d/nfslock script to support HA NFS

Alan Robertson linux-ha-dev@lists.community.tummy.com
Mon, 30 Jun 2003 10:21:00 -0600


This is a multi-part message in MIME format.
--------------010203080105050301040205
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

Attached is my patch to the /etc/init.d/nfslock script for SuSE Linux.

-- 
     Alan Robertson <alanr@unix.sh>

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

--------------010203080105050301040205
Content-Type: text/plain;
 name="nfslock.patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="nfslock.patch.txt"

--- /root/nfslock	2003-06-30 10:10:00.000000000 -0600
+++ ./nfslock	2003-06-30 10:14:21.000000000 -0600
@@ -30,6 +30,11 @@
 RPCLOCKD=""
 test -x /sbin/rpc.lockd && RPCLOCKD=/sbin/rpc.lockd
 
+case $STATD_HOSTNAME in
+  "")	;;
+  *)	STATDFLAGS="-n $STATD_HOSTNAME";;
+esac
+
 case "$1" in
     start)
 	if [ -n "$RPCLOCKD" ] ; then
@@ -41,7 +46,7 @@
 	fi
 	if [ -n "$RPCSTATD" ] ; then
 	    echo -n "Starting NFS stat daemon "
-	    checkproc $RPCSTATD || startproc $RPCSTATD
+	    checkproc $RPCSTATD || startproc $RPCSTATD $STATDFLAGS
 	    rc_status -v
 	fi
       ;;

--------------010203080105050301040205--