[blfs-book] r9025 - trunk/bootscripts/blfs/init.d

ken at linuxfromscratch.org ken at linuxfromscratch.org
Mon Nov 28 07:43:38 PST 2011


Author: ken
Date: 2011-11-28 08:43:33 -0700 (Mon, 28 Nov 2011)
New Revision: 9025

Modified:
   trunk/bootscripts/blfs/init.d/dhcp
   trunk/bootscripts/blfs/init.d/netfs
   trunk/bootscripts/blfs/init.d/nfs-client
   trunk/bootscripts/blfs/init.d/nfs-server
   trunk/bootscripts/blfs/init.d/portmap
   trunk/bootscripts/blfs/init.d/random
   trunk/bootscripts/blfs/init.d/rpcbind
Log:
replace tabs b 3 spaces

Modified: trunk/bootscripts/blfs/init.d/dhcp
===================================================================
--- trunk/bootscripts/blfs/init.d/dhcp	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/dhcp	2011-11-28 15:43:33 UTC (rev 9025)
@@ -30,32 +30,32 @@
 #$Date$
 
 case "$1" in
-	start)
-		log_info_msg "Starting DHCP Server..."
-		start_daemon /usr/sbin/dhcpd -q eth1
-		evaluate_retval
-		;;
+   start)
+      log_info_msg "Starting DHCP Server..."
+      start_daemon /usr/sbin/dhcpd -q eth1
+      evaluate_retval
+      ;;
 
-	stop)
-		log_info_msg "Stopping DHCP Server..."
-		killproc /usr/sbin/dhcpd
-		evaluate_retval
-		;;
+   stop)
+      log_info_msg "Stopping DHCP Server..."
+      killproc /usr/sbin/dhcpd
+      evaluate_retval
+      ;;
 
-	restart)
-		$0 stop
-		sleep 1
-		$0 start
-		;;
+   restart)
+      $0 stop
+      sleep 1
+      $0 start
+      ;;
 
-	status)
-		statusproc /usr/sbin/dhcpd
-		;;
+   status)
+      statusproc /usr/sbin/dhcpd
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop|restart|status}"
-		exit 1
-		;;
+   *)
+      echo "Usage: $0 {start|stop|restart|status}"
+      exit 1
+      ;;
 esac
 
 # End $rc_base/init.d/dhcp

Modified: trunk/bootscripts/blfs/init.d/netfs
===================================================================
--- trunk/bootscripts/blfs/init.d/netfs	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/netfs	2011-11-28 15:43:33 UTC (rev 9025)
@@ -33,84 +33,83 @@
 #$Date$
 
 case "$1" in
-	start)
-		# The following line mounts all entries in fstab that
-		# have the _netdev option.  This is required for network
-		# filesystems to be mounted at boot time.
-		log_info_msg "Mounting network volumes..."
-		/bin/mount -a -O _netdev
-		evaluate_retval
-		;;
+   start)
+      # The following line mounts all entries in fstab that
+      # have the _netdev option.  This is required for network
+      # filesystems to be mounted at boot time.
+      log_info_msg "Mounting network volumes..."
+      /bin/mount -a -O _netdev
+      evaluate_retval
+      ;;
 
-	stop)
-		log_info_msg "Unmounting network volumes..."
+   stop)
+      log_info_msg "Unmounting network volumes..."
+      # The following line obtains a list from the output of
+      # mount for all netfs types and anything that was
+      # mounted with the _netdev option.
+      NETMOUNTS=`/bin/mount \
+        | /bin/grep '_netdev\|smbfs\|ncpfs\|coda\|nfs' \
+        | /usr/bin/cut -d " " -f 3 | /bin/sed ':a;$!N;s/\n/ /;ta'`
 
-		# The following line obtains a list from the output of
-		# mount for all netfs types and anything that was
-		# mounted with the _netdev option.
-		NETMOUNTS=`/bin/mount \
-			| /bin/grep '_netdev\|smbfs\|ncpfs\|coda\|nfs' \
-			| /usr/bin/cut -d " " -f 3 | /bin/sed ':a;$!N;s/\n/ /;ta'`
+      # Check to see if anything was listed from above
+      # (see if anything is actually needs to be unmounted)
+      if [ x"$NETMOUNTS" != x ]
+      then
+         # There is something mounted
+         # terminate the echo -n above
+         echo ""
 
-		# Check to see if anything was listed from above
-		# (see if anything is actually needs to be unmounted)
-		if [ x"$NETMOUNTS" != x ]
-		then
-			# There is something mounted
-			# terminate the echo -n above
-			echo ""
+         # Try and stop processes the nice way
+         # (probably won't work in most cases)
+         /bin/fuser -SIGTERM -km $NETMOUNTS > /dev/null
 
-			# Try and stop processes the nice way
-			# (probably won't work in most cases)
-			/bin/fuser -SIGTERM -km $NETMOUNTS > /dev/null
+         # Check and see if it found anything.  If it
+         # did, then give 3 seconds for things to exit
+         # the nice way before killing them off.
+         # This one will work all of the time!
+         if [ $? = 0 ]
+         then
+            /bin/sleep 3
+            /bin/fuser -km $NETMOUNTS > /dev/null
+         fi
 
-			# Check and see if it found anything.  If it
-			# did, then give 3 seconds for things to exit
-			# the nice way before killing them off.
-			# This one will work all of the time!
-			if [ $? = 0 ]
-			then
-				/bin/sleep 3
-				/bin/fuser -km $NETMOUNTS > /dev/null
-			fi
+         # We now need to unmount all network filesystems.
+         # We will do this with two umount commands to allow
+         # for broken behavior of smbmount, and also to make
+         # certain that netmounts without the _netdev option
+         # will still get unmounted.
+         /bin/umount -af -O _netdev
+         # save the retval
+            if [ $? != 0 ]
+            then
+                NERRVAL=1
+            fi
 
-			# We now need to unmount all network filesystems.
-			# We will do this with two umount commands to allow
-			# for broken behavior of smbmount, and also to make
-			# certain that netmounts without the _netdev option
-			# will still get unmounted.
-			/bin/umount -af -O _netdev
-			# save the retval
-			if [ $? != 0 ]
-			then
-				NERRVAL=1
-			fi
+         # Now catch the rest of the network filesystems
+         # by fstype.  This list can be extended later as
+         # more network filesystems are supported by mount.
+         /bin/umount -af -t coda,ncpfs,nfs,smbfs
+         if [ $? = 0 ]
+         then
+            [ -z $NERRVAL ]
+            evaluate_retval
+         else
+            # make certain that we return an error
+            /bin/false
+            evaluate_retval
+         fi
+      else
+         # There is nothing mounted
+         log_info_msg "No network volumes mounted!"
+         # print a nice '[  OK  ]' message
+         echo_ok
+      fi
+      ;;
 
-			# Now catch the rest of the network filesystems
-			# by fstype.  This list can be extended later as
-			# more network filesystems are supported by mount.
-			/bin/umount -af -t coda,ncpfs,nfs,smbfs
-			if [ $? = 0 ]
-			then
-				[ -z $NERRVAL ]
-				evaluate_retval
-			else
-				# make certain that we return an error
-				/bin/false              
-				evaluate_retval
-			fi
-		else
-			# There is nothing mounted
-			log_info_msg "No network volumes mounted!"
-			# print a nice '[  OK  ]' message
-			echo_ok
-		fi
-		;;
-
-*)
-                echo "Usage: $0 {start|stop}"
-                exit 1
-                ;;
+   *)
+      echo "Usage: $0 {start|stop}"
+      exit 1
+      ;;
 esac
 
 # End $rc_base/init.d/netfs

Modified: trunk/bootscripts/blfs/init.d/nfs-client
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-client	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/nfs-client	2011-11-28 15:43:33 UTC (rev 9025)
@@ -33,30 +33,30 @@
 #$Date$
 
 case "$1" in
-	start)
-		log_info_msg "Starting NFS statd..."
-		start_daemon /usr/sbin/rpc.statd
-		;;
+   start)
+      log_info_msg "Starting NFS statd..."
+      start_daemon /usr/sbin/rpc.statd
+      ;;
 
-	stop)
-		log_info_msg "Stopping NFS statd..."
-		killproc /usr/sbin/rpc.statd
-		;;
+   stop)
+      log_info_msg "Stopping NFS statd..."
+      killproc /usr/sbin/rpc.statd
+      ;;
 
-	restart)
-		$0 stop
-		sleep 1
-		$0 start
-		;;
+   restart)
+      $0 stop
+      sleep 1
+      $0 start
+      ;;
 
-	status)
-		statusproc /usr/sbin/rpc.statd
-		;;
+   status)
+      statusproc /usr/sbin/rpc.statd
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop|restart|status}"
-		exit 1
-		;;
+   *)
+      echo "Usage: $0 {start|stop|restart|status}"
+      exit 1
+      ;;
 esac
 
 # End $rc_base/init.d/nfs-client

Modified: trunk/bootscripts/blfs/init.d/nfs-server
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-server	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/nfs-server	2011-11-28 15:43:33 UTC (rev 9025)
@@ -1,15 +1,15 @@
  #!/bin/sh
 #!/bin/sh
-########################################################################
+############################################################################
 # Begin nfs-server
 #
 # Description : Start nfs server
 #
-# Author      : 
+# Author      : Changes for LFS-7.0 by Ken Moffat <ken at linuxfromscratch.org>
 #
 # Version     : LFS 7.0
 #
-########################################################################
+############################################################################
 
 ### BEGIN INIT INFO
 # Provides:            nfs server
@@ -33,97 +33,97 @@
  . /etc/sysconfig/nfs-server
 
  case "$1" in
-	start)
-		log_info_msg "Starting NFS mountd..."
-		start_daemon /usr/sbin/rpc.mountd
+   start)
+      log_info_msg "Starting NFS mountd..."
+      start_daemon /usr/sbin/rpc.mountd
 
-		log_info_msg "Starting NFS nfsd..."
-		start_daemon /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
+      log_info_msg "Starting NFS nfsd..."
+      start_daemon /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
 
-		log_info_msg "Starting NFS statd..."
-		start_daemon /usr/sbin/rpc.statd
+      log_info_msg "Starting NFS statd..."
+      start_daemon /usr/sbin/rpc.statd
 
-		if [ "$QUOTAS" = "yes" ]; then
-			log_info_msg "Starting NFS rquotad..."
-			start_daemon /usr/sbin/rpc.rquotad
-		fi
+      if [ "$QUOTAS" = "yes" ]; then
+         log_info_msg "Starting NFS rquotad..."
+         start_daemon /usr/sbin/rpc.rquotad
+      fi
 
-		# NFSD support only in 2.6 kernel
-		/bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
-		if [ $? = 0 ]; then
-			log_info_msg "Mounting nfsd virtual filesystem..."
-			/bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
-			evaluate_retval
-		fi
+      # NFSD support only in 2.6 kernel
+      /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
+      if [ $? = 0 ]; then
+         log_info_msg "Mounting nfsd virtual filesystem..."
+         /bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
+         evaluate_retval
+      fi
 
-		# Make certain that the list is refreshed on
-		# a restart.
-		log_info_msg "Exporting NFS Filesystems..."
-		/usr/sbin/exportfs -ra 2>&1 > /dev/null
-		evaluate_retval
-		;;
+      # Make certain that the list is refreshed on
+      # a restart.
+      log_info_msg "Exporting NFS Filesystems..."
+      /usr/sbin/exportfs -ra 2>&1 > /dev/null
+      evaluate_retval
+      ;;
 
-	stop)
-		log_info_msg "Stopping NFS statd..."
-		killproc /usr/sbin/rpc.statd
+   stop)
+      log_info_msg "Stopping NFS statd..."
+      killproc /usr/sbin/rpc.statd
 
-		log_info_msg "Stopping NFS nfsd..."
-		# nfsd needs HUP....
-		killproc nfsd HUP
+      log_info_msg "Stopping NFS nfsd..."
+      # nfsd needs HUP....
+      killproc nfsd HUP
 
-		log_info_msg "Stopping NFS mountd..."
-		killproc /usr/sbin/rpc.mountd
+      log_info_msg "Stopping NFS mountd..."
+      killproc /usr/sbin/rpc.mountd
 
-		if [ "$QUOTAS" = "yes" ]; then
-			log_info_msg "Stopping NFS rquotad..."
-			killproc /usr/sbin/rpc.rquotad
-		fi
+      if [ "$QUOTAS" = "yes" ]; then
+         log_info_msg "Stopping NFS rquotad..."
+         killproc /usr/sbin/rpc.rquotad
+      fi
 
-		log_info_msg "Refreshing NFS Exported Filesystems..."
-		/usr/sbin/exportfs -au 2>&1 > /dev/null
-		evaluate_retval
+      log_info_msg "Refreshing NFS Exported Filesystems..."
+      /usr/sbin/exportfs -au 2>&1 > /dev/null
+      evaluate_retval
 
-		# NFSD support only in 2.6 kernel
-                 /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
-                 if [ $? = 0 ]; then
-			log_info_msg "Unmounting NFS Virtual Filesystem..."
-			/bin/umount /proc/fs/nfsd 2>&1 > /dev/null
-			evaluate_retval
-		fi
+      # NFSD support only in 2.6 kernel
+      /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
+      if [ $? = 0 ]; then
+         log_info_msg "Unmounting NFS Virtual Filesystem..."
+         /bin/umount /proc/fs/nfsd 2>&1 > /dev/null
+         evaluate_retval
+      fi
 
-		# Remove a pid file that isn't done automatically
-		log_info_msg "Removing the rpc.statd pid file if it exists"
-		if [ -f /var/run/rpc.statd.pid ]; then
-		    rm -f /var/run/rpc.statd.pid
-		fi
-		;;
+      # Remove a pid file that isn't done automatically
+      log_info_msg "Removing the rpc.statd pid file if it exists"
+      if [ -f /var/run/rpc.statd.pid ]; then
+         rm -f /var/run/rpc.statd.pid
+      fi
+      ;;
 
-	reload)
-		log_info_msg "Reloading NFS Server..."
-		/usr/sbin/exportfs -ra
-		evaluate_retval
-		;;
+   reload)
+      log_info_msg "Reloading NFS Server..."
+      /usr/sbin/exportfs -ra
+      evaluate_retval
+      ;;
 
-	restart)
-		$0 stop
-		sleep 1
-		$0 start
-		;;
+   restart)
+      $0 stop
+      sleep 1
+      $0 start
+      ;;
 
-	status)
-		statusproc /usr/sbin/rpc.mountd
-		## Special case for nfsd with no full path
-		statusproc nfsd
-		statusproc /usr/sbin/rpc.statd
-		if [ "$QUOTA" = "yes" ]; then
-			statusproc rpc.rquotad
-		fi
-		;;
+   status)
+      statusproc /usr/sbin/rpc.mountd
+      ## Special case for nfsd with no full path
+      statusproc nfsd
+      statusproc /usr/sbin/rpc.statd
+      if [ "$QUOTA" = "yes" ]; then
+         statusproc rpc.rquotad
+      fi
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop|reload|restart|status}"
-		exit 1
-		;;
+   *)
+      echo "Usage: $0 {start|stop|reload|restart|status}"
+      exit 1
+      ;;
 esac
 
 # End $rc_base/init.d/nfs-server

Modified: trunk/bootscripts/blfs/init.d/portmap
===================================================================
--- trunk/bootscripts/blfs/init.d/portmap	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/portmap	2011-11-28 15:43:33 UTC (rev 9025)
@@ -32,32 +32,32 @@
 #$Date$
 
 case "$1" in
-	start)
-		log_info_msg "Starting RPC Portmap"
-		start_daemon /sbin/portmap
-      evaluate_retval
-		;;
+   start)
+       log_info_msg "Starting RPC Portmap"
+       start_daemon /sbin/portmap
+       evaluate_retval
+       ;;
 
-	stop)
-		log_info_msg "Stopping Portmap"
-		killproc /sbin/portmap
-      evaluate_retval
-		;;
+   stop)
+       log_info_msg "Stopping Portmap"
+       killproc /sbin/portmap
+       evaluate_retval
+       ;;
 
-	restart)
-		$0 stop
-		sleep 1
-		$0 start
-		;;
+   restart)
+      $0 stop
+      sleep 1
+      $0 start
+      ;;
 
-	status)
-		statusproc /sbin/portmap
-		;;
+   status)
+      statusproc /sbin/portmap
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop|restart|status}"
-		exit 1
-		;;
+   *)
+      echo "Usage: $0 {start|stop|restart|status}"
+      exit 1
+      ;;
 
 esac
 

Modified: trunk/bootscripts/blfs/init.d/random
===================================================================
--- trunk/bootscripts/blfs/init.d/random	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/random	2011-11-28 15:43:33 UTC (rev 9025)
@@ -35,27 +35,27 @@
 #$Date$
 
 case "$1" in
-	start)
-		log_info_msg "Initializing kernel random number generator..."
-		if [ -f /var/tmp/random-seed ]; then
-			/bin/cat /var/tmp/random-seed >/dev/urandom
-		fi
-		/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
-			count=1 &>/dev/null
-		evaluate_retval
-		;;
+   start)
+      log_info_msg "Initializing kernel random number generator..."
+      if [ -f /var/tmp/random-seed ]; then
+         /bin/cat /var/tmp/random-seed >/dev/urandom
+      fi
+      /bin/dd if=/dev/urandom of=/var/tmp/random-seed \
+        count=1 &>/dev/null
+      evaluate_retval
+      ;;
 
-	stop)
-		log_info_msg "Saving random seed..."
-		/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
-			count=1 &>/dev/null
-		evaluate_retval
-		;;
+   stop)
+      log_info_msg "Saving random seed..."
+      /bin/dd if=/dev/urandom of=/var/tmp/random-seed \
+        count=1 &>/dev/null
+      evaluate_retval
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop}"
-		exit 1
-		;;
+   *)
+      echo "Usage: $0 {start|stop}"
+      exit 1
+      ;;
 esac
 
 # End $rc_base/init.d/random

Modified: trunk/bootscripts/blfs/init.d/rpcbind
===================================================================
--- trunk/bootscripts/blfs/init.d/rpcbind	2011-11-28 15:25:25 UTC (rev 9024)
+++ trunk/bootscripts/blfs/init.d/rpcbind	2011-11-28 15:43:33 UTC (rev 9025)
@@ -34,32 +34,32 @@
 #$Date$
 
 case "$1" in
-	start)
-		log_info_msg "Starting rpcbind"
-		start_daemon /sbin/rpcbind
+   start)
+      log_info_msg "Starting rpcbind"
+      start_daemon /sbin/rpcbind
       evaluate_retval
-		;;
+      ;;
 
-	stop)
-		log_info_msg "Stopping rpcbind"
-		killproc /sbin/rpcbind
+   stop)
+      log_info_msg "Stopping rpcbind"
+      killproc /sbin/rpcbind
       evaluate_retval
-		;;
+      ;;
 
-	restart)
-		$0 stop
-		sleep 1
-		$0 start
-		;;
+   restart)
+      $0 stop
+      sleep 1
+      $0 start
+      ;;
 
-	status)
-		statusproc /sbin/rpcbind
-		;;
+   status)
+      statusproc /sbin/rpcbind
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop|restart|status}"
-		exit 1
-		;;
+   *)
+      echo "Usage: $0 {start|stop|restart|status}"
+      exit 1
+      ;;
 
 esac
 




More information about the blfs-book mailing list