r2756 - trunk/bootscripts/blfs/init.d

dj at linuxfromscratch.org dj at linuxfromscratch.org
Tue Sep 28 18:15:14 PDT 2004


Author: dj
Date: 2004-09-28 19:15:13 -0600 (Tue, 28 Sep 2004)
New Revision: 2756

Modified:
   trunk/bootscripts/blfs/init.d/nfs-client
   trunk/bootscripts/blfs/init.d/nfs-server
Log:
Fixed nfs scritps per bugs 854, 867, and 954.

Modified: trunk/bootscripts/blfs/init.d/nfs-client
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-client	2004-09-27 13:47:52 UTC (rev 2755)
+++ trunk/bootscripts/blfs/init.d/nfs-client	2004-09-29 01:15:13 UTC (rev 2756)
@@ -9,14 +9,18 @@
 
 case "$1" in
 	start)
-		echo "Starting NFS Client Services..."
+		echo "Starting NFS statd..."
 		loadproc /usr/sbin/rpc.statd
+
+		echo "Starting NFS lockd..."
 		loadproc /usr/sbin/rpc.lockd
 		;;
 
 	stop)
-		echo "Stopping NFS Client Services..."
+		echo "Stopping NFS lockd..."
 		killproc /usr/sbin/rpc.lockd
+
+		echo "Stopping NFS statd..."
 		killproc /usr/sbin/rpc.statd
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/nfs-server
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-server	2004-09-27 13:47:52 UTC (rev 2755)
+++ trunk/bootscripts/blfs/init.d/nfs-server	2004-09-29 01:15:13 UTC (rev 2756)
@@ -6,24 +6,68 @@
 
 . /etc/sysconfig/rc
 . $rc_functions
+. /etc/sysconfig/nfs
 
 case "$1" in
 	start)
-		echo "Starting NFS Server..."
+		echo "Starting NFS mountd..."
 		loadproc /usr/sbin/rpc.mountd
-		loadproc /usr/sbin/rpc.nfsd 8
+
+		echo "Starting NFS nfsd..."
+		loadproc /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
+
+		echo "Starting NFS statd..."
 		loadproc /usr/sbin/rpc.statd
+
+		if [ "$QUOTAS" == "yes" ]; then
+			echo "Starting NFS rquotad..."
+			loadproc /usr/sbin/rpc.rquotad
+		fi
+		
+		# NFSD support only in 2.6 kernel
+		/bin/uname -r | grep "2.6"
+		if [ $? == 0 ]; then
+			echo "Mounting nfsd virtual filesystem..."
+			mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
+			evalutate_retval
+		fi
+
+		# Make ceratin that the list is refreshed on 
+		# a restart.
+		echo "Starting NFS Server..."
+		exportfs -ra 2>&1 > /dev/null
+		evaluate_retval
 		;;
 
 	stop)
-		echo "Stopping NFS Server..."
-		killproc /usr/sbin/rpc.nfsd
-		killproc /usr/sbin/rpc.mountd
+		echo "Stopping NFS statd..."
+		killproc rpc.statd
+
+		echo "Stopping NFS nfsd..."
+		# nfsd needs HUP....
+		TEMPSTOPSIG="$STOPSIG"
+		STOPSIG="HUP"
+		killproc nfsd
+		# return STOPSIG to it's orginal value...
+		STOPSIG="$TEMPSTOPSIG"
+
+		echo "Stopping NFS mountd..."
+		killproc rpc.mountd
+
+		if [ "$QUOTAS" == "yes" ]; then
+			echo "Stopping NFS rquotad..."
+			killproc rpc.rquotad
+		fi
+
+		echo "Stopping NFS Server Services..."
+		exportfs -au 2>&1 > /dev/null
+		evaluate_retval
 		;;
 
 	reload)
 		echo "Reloading NFS Server..."
-		/usr/sbin/exportfs -ra
+		exportfs -ra
+		evaluate_retval
 		;;
 
 	restart)
@@ -33,8 +77,12 @@
 		;;
 
 	status)
-		statusproc /usr/sbin/rpc.mountd
-		statusproc /usr/sbin/rpc.nfsd
+		statusproc rpc.mountd
+		statusproc nfsd
+		statusproc rpc.statd
+		if [ "$QUOTA" == "yes" ]; then
+			statusproc rpc.rquotad
+		fi
 		;;
 
 	*)




More information about the blfs-book mailing list