Author: bdubbs
Date: 2011-12-01 15:43:56 -0700 (Thu, 01 Dec 2011)
New Revision: 9048

Modified:
   trunk/BOOK/general.ent
   trunk/BOOK/introduction/welcome/changelog.xml
   trunk/BOOK/networking/netprogs/netprogs.xml
   trunk/BOOK/networking/netprogs/nfs-utils.xml
   trunk/BOOK/networking/netprogs/rpcbind.xml
   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/rpcbind
Log:
Updated nfs related bootscripts.
Removed portmap in favor of rpcbind.
Updated instructions for rpcbind and nfs-utils.


Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent      2011-12-01 18:17:33 UTC (rev 9047)
+++ trunk/BOOK/general.ent      2011-12-01 22:43:56 UTC (rev 9048)
@@ -56,7 +56,7 @@
 <!ENTITY lfs-vim-version              "7.3">
 <!-- End LFS versions -->
 
-<!ENTITY blfs-bootscripts-version     "20111126">
+<!ENTITY blfs-bootscripts-version     "20111201">
 <!ENTITY blfs-bootscripts-download    
"&downloads-root;/blfs-bootscripts-&blfs-bootscripts-version;.tar.bz2">
 
 <!ENTITY blfs-wiki                    "http://wiki.&lfs-domainname;/blfs/wiki";>

Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml       2011-12-01 18:17:33 UTC 
(rev 9047)
+++ trunk/BOOK/introduction/welcome/changelog.xml       2011-12-01 22:43:56 UTC 
(rev 9048)
@@ -45,6 +45,10 @@
       <para>December 1st, 2011</para>
       <itemizedlist>
         <listitem>
+          <para>[bdubbs] - Updated nfs related bootscripts.
+          Removed portmap in favor of rpcbind.</para>
+        </listitem>
+        <listitem>
           <para>[ken] - Updated dhcp to 4.2.3.</para>
         </listitem>
         <listitem>

Modified: trunk/BOOK/networking/netprogs/netprogs.xml
===================================================================
--- trunk/BOOK/networking/netprogs/netprogs.xml 2011-12-01 18:17:33 UTC (rev 
9047)
+++ trunk/BOOK/networking/netprogs/netprogs.xml 2011-12-01 22:43:56 UTC (rev 
9048)
@@ -30,7 +30,7 @@
 <!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="nfs-utils-client.xml"/> -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="netfs.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="ntp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="portmap.xml"/>
+<!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="portmap.xml"/> -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="rpcbind.xml"/>
 <!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="rsync-client.xml"/> -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="rsync.xml"/>

Modified: trunk/BOOK/networking/netprogs/nfs-utils.xml
===================================================================
--- trunk/BOOK/networking/netprogs/nfs-utils.xml        2011-12-01 18:17:33 UTC 
(rev 9047)
+++ trunk/BOOK/networking/netprogs/nfs-utils.xml        2011-12-01 22:43:56 UTC 
(rev 9048)
@@ -58,39 +58,41 @@
       </listitem>
     </itemizedlist>
 
-    <!--
-    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
-    <itemizedlist spacing='compact'>
-      <listitem>
-        <para>Required patch: <ulink
-        url="&patch-root;/nfs-utils-&nfs-utils-version;-gcc4-1.patch"/></para>
-      </listitem>
-    </itemizedlist>
-    -->
-
     <bridgehead renderas="sect3">NFS Utilities Dependencies</bridgehead>
 
     <bridgehead renderas="sect4">Required</bridgehead>
-    <para role="required"><xref linkend="rpcbind"/> (Runtime dependency)</para>
+    <para role="required">
+       <xref linkend="libtirpc"/> and 
+       <xref linkend="pkgconfig"/>
+    </para>
+    
+    <para role="required">
+       <xref linkend="rpcbind"/> (Runtime dependency)
+     </para>
 
     <bridgehead renderas="sect4">Optional</bridgehead>
-    <para role="optional"><xref linkend="tcpwrappers"/></para>
+    <para role="optional"> 
+      <xref linkend="tcpwrappers"/>
+    </para>
 
     <bridgehead renderas="sect4">Optional for NFSv4 Support</bridgehead>
-    <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
-    <ulink url="http://www.monkey.org/~provos/libevent/";>libevent</ulink> and
-    <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>libnfsidmap</ulink>
+    <para role="optional">
+      <ulink url="http://www.monkey.org/~provos/libevent/";>libevent</ulink> and
+      <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>libnfsidmap</ulink>
     </para>
 
     <bridgehead renderas="sect4">Optional for GSS (RPC Security) 
Support</bridgehead>
-    <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
-    <xref linkend="mitkrb"/> or
-    <xref linkend="heimdal"/> or
-    <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>libgssapi</ulink>, and
-    <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>librpcsecgss</ulink></para>
+    <para role="optional">
+      <xref linkend="mitkrb"/> or
+      <xref linkend="heimdal"/> or
+      <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>libgssapi</ulink>, and
+      <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>librpcsecgss</ulink>
+    </para>
 
     <bridgehead renderas="sect4">Optional for SPKM-3 Support</bridgehead>
-    <para><ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>SPKM-3</ulink></para>
+    <para>
+      <ulink 
url="http://www.citi.umich.edu/projects/nfsv4/linux/";>SPKM-3</ulink>
+    </para>
 
     <para condition="html" role="usernotes">User Notes:
     <ulink url="&blfs-wiki;/nfs-utils"/></para>
@@ -195,7 +197,7 @@
       for sharing the <filename class="directory">/home</filename> directory
       over the local network, the following line may be added:</para>
 
-<screen role="root"><userinput>/home 
<replaceable>&lt;192.168.0.0/255.255.255.0&gt;</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
+<screen role="root"><userinput>/home 
<replaceable>&lt;192.168.0.0/24&gt;</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
 
       <indexterm zone="nfs-utils nfs-utils-server-config">
         <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
@@ -205,9 +207,8 @@
         <title>Boot Script</title>
 
         <para>Install the <filename>/etc/rc.d/init.d/nfs-server</filename>
-        init script included in the <xref
-        linkend="bootscripts"/> package to start the server
-        at boot.</para>
+        init script included in the <xref linkend="bootscripts"/> package 
+        to start the server at boot.</para>
 
 <screen role="root"><userinput>make install-nfs-server</userinput></screen>
 
@@ -225,6 +226,9 @@
 KILLDELAY="10"</literal>
 EOF</userinput></screen>
 
+        <note><para>The above parameters may be optionally placed in 
+        <filename>/etc/sysconfig/rc.site</filename>.</para></note>
+
         <indexterm zone="nfs-utils nfs-utils-server-init">
           <primary
           
sortas="e-etc-sysconfig-nfs-server">/etc/sysconfig/nfs-server</primary>
@@ -238,7 +242,7 @@
         <para>If you have <xref linkend="tcpwrappers"/> installed and there
         is a restrictive <filename>/etc/hosts.deny</filename> file, ensure you
         have an entry in the <filename>/etc/hosts.allow</filename> file for 
access
-        from the portmap daemon. See the man page in section 5 for 
hosts_access for
+        from the rpcbind daemon. See the man page in section 5 for 
hosts_access for
         details on creating appropriate rules.</para>
 
       </sect4>
@@ -265,11 +269,13 @@
       <sect4  id="nfs-utils-client-init">
         <title>Boot Script</title>
 
-        <para>Install the <filename>/etc/rc.d/init.d/nfs-client</filename>
-        init script included in the
-        <xref linkend="bootscripts"/> package to
-        start the client services at boot.</para>
+        <note><para>The following boot script is not required if the 
+        nfs-server script is installed.</para></note>
 
+        <para>Install the <filename>/etc/rc.d/init.d/nfs-client</filename> init
+        script included in the <xref linkend="bootscripts"/> package to start
+        the client services at boot.</para>
+
 <screen role="root"><userinput>make install-nfs-client</userinput></screen>
 
         <indexterm zone="nfs-utils nfs-utils-client-config">
@@ -277,9 +283,9 @@
         </indexterm>
 
         <para>To automatically mount <systemitem
-        class="filesystem">nfs</systemitem> filesystems, clients will also
-        need to install the <filename>netfs</filename> bootscript as described
-        in <xref linkend="postlfs-config-netfs"/>.</para>
+        class="filesystem">nfs</systemitem> filesystems, clients will also need
+        to install the <filename>netfs</filename> bootscript as described in
+        <xref linkend="postlfs-config-netfs"/>.</para>
 
         <indexterm zone="nfs-utils nfs-utils-client-config">
           <primary sortas="f-netfs">netfs</primary>

Modified: trunk/BOOK/networking/netprogs/rpcbind.xml
===================================================================
--- trunk/BOOK/networking/netprogs/rpcbind.xml  2011-12-01 18:17:33 UTC (rev 
9047)
+++ trunk/BOOK/networking/netprogs/rpcbind.xml  2011-12-01 22:43:56 UTC (rev 
9048)
@@ -72,6 +72,12 @@
   <sect2 role="installation">
     <title>Installation of rpcbind</title>
 
+    <para>In order to get <application>rpcbind</application> to work
+    properly, first fix <filename>/etc/services</filename>. As the 
+    <systemitem class="username">root</systemitem> user:</para>
+
+<screen><userinput>sed -i 's/^sunrpc/rpcbind' 
/etc/services</userinput></screen>
+
     <para>Install <application>rpcbind</application> by running the following
     commands:</para>
 

Modified: trunk/bootscripts/blfs/init.d/netfs
===================================================================
--- trunk/bootscripts/blfs/init.d/netfs 2011-12-01 18:17:33 UTC (rev 9047)
+++ trunk/bootscripts/blfs/init.d/netfs 2011-12-01 22:43:56 UTC (rev 9048)
@@ -5,29 +5,27 @@
 # Description : Mount network filesystems
 #
 # Author      : Nathan Coulson - [email protected]
-#              DJ Lucas - [email protected]
+#               DJ Lucas - [email protected]
 #
 # Version     : LFS 7.0
 #
 ########################################################################
 
 ### BEGIN INIT INFO
-# Provides:            nfs mounts
-# Required-Start:      network
+# Provides:    nfs mounts
+# Required-Start: nfs-client nfs-server
 # Should-Start:
-# Required-Stop:       sendsignals
+# Required-Stop:  sendsignals
 # Should-Stop:
-# Default-Start:       3 4 5
-# Default-Stop:                0 1 2 6
-# Short-Description:   Mounts network volumes.
-# Description:         Mounts anything marked as _netdev, and umounts
-#                      any mounted _netfs,smbfs,ncpfd,coda, nfs
-#                      volumes
-# X-LFS-Provided-By:   LFS
+# Default-Start:  3 4 5
+# Default-Stop:   0 1 2 6
+# Short-Description: Mounts network volumes.
+# Description:    Mounts anything marked as _netdev, and umounts
+#        any mounted _netfs, smbfs, ncpfd,coda, or nfs volumes
+# X-LFS-Provided-By: LFS
 ### END INIT INFO
 
 . /lib/lsb/init-functions
-# Begin $rc_base/init.d/netfs
 
 #$LastChangedBy$
 #$Date$
@@ -44,20 +42,18 @@
 
    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'`
+         | /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
+      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)
@@ -67,9 +63,8 @@
          # 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
+         if [ $? = 0 ]; then
+            /bin/sleep ${KILLDELAY:-3}  # Default is 3, not minus 3
             /bin/fuser -km $NETMOUNTS > /dev/null
          fi
 
@@ -79,37 +74,33 @@
          # 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
 
+         # Save the return value
+         NERRVAL=$?
+
          # 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
+         /bin/umount -af -t coda,ncpfs,nfs,smbfs,nfsd
+
+         if [ $? = 0  -a  $NERRVAL = 0 ]; then
+           (exit 0)
          else
-            # make certain that we return an error
-            /bin/false
-            evaluate_retval
+           (exit 1)
          fi
+
+         evaluate_retval
+
       else
          # There is nothing mounted
-         log_info_msg "No network volumes mounted!"
-         # print a nice '[  OK  ]' message
-         echo_ok
+         log_success_msg2 "No network volumes mounted!"
       fi
       ;;
 
-   *)
+*)
       echo "Usage: $0 {start|stop}"
       exit 1
       ;;
 esac
 
-# End $rc_base/init.d/netfs
+# End /etc/init.d/netfs

Modified: trunk/bootscripts/blfs/init.d/nfs-client
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-client    2011-12-01 18:17:33 UTC (rev 
9047)
+++ trunk/bootscripts/blfs/init.d/nfs-client    2011-12-01 22:43:56 UTC (rev 
9048)
@@ -4,31 +4,28 @@
 #
 # Description : Start statd
 #
-# Author      : 
+# Authors     : Ken Moffat - [email protected]
+#               Bruce Dubbs - [email protected]
 #
 # Version     : LFS 7.0
 #
 ########################################################################
 
 ### BEGIN INIT INFO
-# Provides:            File locking for nfs client
-# Required-Start:      network
+# Provides:    File locking for nfs client
+# Required-Start: rpcbind
 # Should-Start:
-# Required-Stop:       sendsignals
+# Required-Stop:  sendsignals
 # Should-Stop:
-# Default-Start:       3 4 5
-# Default-Stop:                0 1 2 6
-# Short-Description:   Starts statd
-# Description:         Rpc.statd provides file locking on nfs.
-# X-LFS-Provided-By:   LFS
+# Default-Start:  3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Starts statd
+# Description:    rpc.statd provides file locking on nfs.
+# X-LFS-Provided-By: LFS
 ### END INIT INFO
 
 . /lib/lsb/init-functions
-# Begin $rc_base/init.d/nfs-client
 
-# Based on sysklogd script from LFS-3.1 and earlier.
-# Rewritten by Gerard Beekmans  - [email protected]
-
 #$LastChangedBy$
 #$Date$
 
@@ -36,11 +33,13 @@
    start)
       log_info_msg "Starting NFS statd..."
       start_daemon /usr/sbin/rpc.statd
+      evaluate_retval
       ;;
 
    stop)
       log_info_msg "Stopping NFS statd..."
       killproc /usr/sbin/rpc.statd
+      evaluate_retval
       ;;
 
    restart)
@@ -59,4 +58,4 @@
       ;;
 esac
 
-# End $rc_base/init.d/nfs-client
+# End /etc/init.d/nfs-client

Modified: trunk/bootscripts/blfs/init.d/nfs-server
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-server    2011-12-01 18:17:33 UTC (rev 
9047)
+++ trunk/bootscripts/blfs/init.d/nfs-server    2011-12-01 22:43:56 UTC (rev 
9048)
@@ -1,26 +1,26 @@
- #!/bin/sh
 #!/bin/sh
-############################################################################
+########################################################################
 # Begin nfs-server
 #
 # Description : Start nfs server
 #
-# Author      : Changes for LFS-7.0 by Ken Moffat <[email protected]>
+# Authors     : Ken Moffat - [email protected]
+#               Bruce Dubbs - [email protected]
 #
 # Version     : LFS 7.0
 #
-############################################################################
+########################################################################
 
 ### BEGIN INIT INFO
 # Provides:            nfs server
-# Required-Start:      network
+# Required-Start:      rpcbind
 # Should-Start:
 # Required-Stop:       sendsignals
 # Should-Stop:
 # Default-Start:       3 4 5
 # Default-Stop:        0 1 2 6
 # Short-Description:   Starts the nfs server
-# Description:         Starts the dhcp server to export directories.
+# Description:         Starts the nfs server and exports directories.
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
@@ -36,16 +36,20 @@
    start)
       log_info_msg "Starting NFS mountd..."
       start_daemon /usr/sbin/rpc.mountd
+      evaluate_retval
 
       log_info_msg "Starting NFS nfsd..."
       start_daemon /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
+      evaluate_retval
 
       log_info_msg "Starting NFS statd..."
       start_daemon /usr/sbin/rpc.statd
+      evaluate_retval
 
       if [ "$QUOTAS" = "yes" ]; then
          log_info_msg "Starting NFS rquotad..."
          start_daemon /usr/sbin/rpc.rquotad
+         evaluate_retval
       fi
 
       # NFSD support only in 2.6 kernel
@@ -56,30 +60,14 @@
          evaluate_retval
       fi
 
-      # Make certain that the list is refreshed on
-      # a restart.
+      # 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
-
-      log_info_msg "Stopping NFS nfsd..."
-      # nfsd needs HUP....
-      killproc nfsd HUP
-
-      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
-
-      log_info_msg "Refreshing NFS Exported Filesystems..."
+      log_info_msg "Removing NFS Exported Filesystems..."
       /usr/sbin/exportfs -au 2>&1 > /dev/null
       evaluate_retval
 
@@ -91,10 +79,29 @@
          evaluate_retval
       fi
 
+      if [ "$QUOTAS" = "yes" ]; then
+         log_info_msg "Stopping NFS rquotad..."
+         killproc /usr/sbin/rpc.rquotad
+         evaluate_retval
+      fi
+
+      log_info_msg "Stopping NFS statd..."
+      killproc /usr/sbin/rpc.statd
+      evaluate_retval
+
+      log_info_msg "Stopping NFS nfsd..."
+      # nfsd needs HUP.  Can't use killproc for kernel process.
+      killall -HUP nfsd 
+      evaluate_retval
+
+      log_info_msg "Stopping NFS mountd..."
+      killproc /usr/sbin/rpc.mountd
+      evaluate_retval
+
       # 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
+          log_success_msg "Removing the rpc.statd pid file if it exists"
+          rm -f /var/run/rpc.statd.pid
       fi
       ;;
 
@@ -126,4 +133,4 @@
       ;;
 esac
 
-# End $rc_base/init.d/nfs-server
+# End /etc/init.d/nfs-server

Modified: trunk/bootscripts/blfs/init.d/rpcbind
===================================================================
--- trunk/bootscripts/blfs/init.d/rpcbind       2011-12-01 18:17:33 UTC (rev 
9047)
+++ trunk/bootscripts/blfs/init.d/rpcbind       2011-12-01 22:43:56 UTC (rev 
9048)
@@ -28,7 +28,6 @@
 ### END INIT INFO
 
 . /lib/lsb/init-functions
-# Begin $rc_base/init.d/rpcbind
 
 #$LastChangedBy$
 #$Date$

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to