[lfs-book] r9728 - in trunk/BOOK: . bootscripts/lfs/init.d bootscripts/lfs/lib/services bootscripts/lfs/sbin chapter01 chapter07

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sat Feb 4 22:05:49 PST 2012


Author: bdubbs
Date: 2012-02-04 23:05:45 -0700 (Sat, 04 Feb 2012)
New Revision: 9728

Modified:
   trunk/BOOK/bootscripts/lfs/init.d/cleanfs
   trunk/BOOK/bootscripts/lfs/init.d/mountfs
   trunk/BOOK/bootscripts/lfs/init.d/rc
   trunk/BOOK/bootscripts/lfs/lib/services/init-functions
   trunk/BOOK/bootscripts/lfs/sbin/ifdown
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter07/network.xml
   trunk/BOOK/packages.ent
Log:
Fixes to bootscripts:
  * Remove unneeded function literals.
  * Fix pidlist logic in statusproc.
  * Fix statusproc usage statement.
  * Add nodevtmpfs in mountfs stop.
  * Be consistent wtih #!/bin/sh

Add nodump to xml so command to print out 70-persistent-net.rules 
will not be used in jhalfs. Fixes a problem in kvm.



Modified: trunk/BOOK/bootscripts/lfs/init.d/cleanfs
===================================================================
--- trunk/BOOK/bootscripts/lfs/init.d/cleanfs	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/bootscripts/lfs/init.d/cleanfs	2012-02-05 06:05:45 UTC (rev 9728)
@@ -30,7 +30,7 @@
 . /lib/lsb/init-functions
 
 # Function to create files/directory on boot.
-function create_files() 
+create_files() 
 {
    # Input to file descriptor 9 and output to stdin (redirection)
    exec 9>&0 < /etc/sysconfig/createfiles

Modified: trunk/BOOK/bootscripts/lfs/init.d/mountfs
===================================================================
--- trunk/BOOK/bootscripts/lfs/init.d/mountfs	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/bootscripts/lfs/init.d/mountfs	2012-02-05 06:05:45 UTC (rev 9728)
@@ -62,7 +62,7 @@
    stop)
       # Don't unmount tmpfs like /run
       log_info_msg "Unmounting all other currently mounted file systems..."
-      umount -a -d -r -t notmpfs,nosysfs >/dev/null
+      umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs >/dev/null
       evaluate_retval
       exit 0
       ;;

Modified: trunk/BOOK/bootscripts/lfs/init.d/rc
===================================================================
--- trunk/BOOK/bootscripts/lfs/init.d/rc	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/bootscripts/lfs/init.d/rc	2012-02-05 06:05:45 UTC (rev 9728)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 ########################################################################
 # Begin rc
 #
@@ -14,7 +14,7 @@
 
 . /lib/lsb/init-functions
 
-function print_error_msg()
+print_error_msg()
 {
    log_failure_msg
    # $i is set when called
@@ -33,7 +33,7 @@
    wait_for_user
 }
 
-function check_script_status()
+check_script_status()
 {
    # $i is set when called
    if [ ! -f ${i} ]; then
@@ -47,7 +47,7 @@
    fi
 }
 
-function run()
+run()
 {
    if [ -z $interactive ]; then
       ${1} ${2}

Modified: trunk/BOOK/bootscripts/lfs/lib/services/init-functions
===================================================================
--- trunk/BOOK/bootscripts/lfs/lib/services/init-functions	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/bootscripts/lfs/lib/services/init-functions	2012-02-05 06:05:45 UTC (rev 9728)
@@ -457,7 +457,7 @@
         kill -0 ${pid} 2> /dev/null
 
         if [ "${?}" -eq "0" ]; then
-            lpids="${pids}${pid} "
+            lpids="${lpids}${pid} "
         else
             exitstatus="1"
         fi
@@ -490,7 +490,7 @@
    local pidlist
 
    if [ "${#}" = "0" ]; then
-      echo "Usage: [-p pidfle] statusproc {program}"
+      echo "Usage: statusproc [-p pidfle] {program}"
       exit 1
    fi
 
@@ -514,7 +514,7 @@
        esac
    done
 
-   if [ -z "${pidfile}" ]; then
+   if [ -n "${pidfile}" ]; then
       pidlist=`pidofproc -p "${pidfile}" $@`
    else
       pidlist=`pidofproc $@`

Modified: trunk/BOOK/bootscripts/lfs/sbin/ifdown
===================================================================
--- trunk/BOOK/bootscripts/lfs/sbin/ifdown	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/bootscripts/lfs/sbin/ifdown	2012-02-05 06:05:45 UTC (rev 9728)
@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/sh 
 ########################################################################
 # Begin /sbin/ifdown
 #

Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/chapter01/changelog.xml	2012-02-05 06:05:45 UTC (rev 9728)
@@ -41,6 +41,21 @@
       <para>2012-02-04</para>
       <itemizedlist>
         <listitem>
+          <para>[bdubbs] - Fixes to bootscripts:
+          <itemizedlist>
+            <listitem><para>Remove unneeded function literals.</para></listitem>
+            <listitem><para>Fix pidlist logic in statusproc.</para></listitem>
+            <listitem><para>Fix statusproc usage statement.</para></listitem>
+            <listitem><para>Add nodevtmpfs in mountfs stop.</para></listitem>
+          </itemizedlist>
+          </para>
+        </listitem>
+         <listitem>
+           <para>[bdubbs] Add nodump to xml so command to print out 
+           70-persistent-net.rules will not be used in jhalfs.
+           Fixes a problem in kvm.</para>
+         </listitem>
+        <listitem>
           <para>[bryan] - Fix up text in section 7.4 ("device and module
           handling"), and change the recommendation for wrapper modules to
           use kmod's support for soft post-dependencies instead.  Fixes

Modified: trunk/BOOK/chapter07/network.xml
===================================================================
--- trunk/BOOK/chapter07/network.xml	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/chapter07/network.xml	2012-02-05 06:05:45 UTC (rev 9728)
@@ -51,7 +51,7 @@
     <para>Now, inspect the <filename>/etc/udev/rules.d/70-persistent-net.rules</filename>
     file, to find out which name was assigned to which network device:</para>
 
-<screen><userinput>cat /etc/udev/rules.d/70-persistent-net.rules</userinput></screen>
+<screen role="nodump"><userinput>cat /etc/udev/rules.d/70-persistent-net.rules</userinput></screen>
 
     <para>The file begins with a comment block followed by two lines for each
     NIC. The first line for each NIC is a commented description showing its

Modified: trunk/BOOK/packages.ent
===================================================================
--- trunk/BOOK/packages.ent	2012-02-04 23:37:17 UTC (rev 9727)
+++ trunk/BOOK/packages.ent	2012-02-05 06:05:45 UTC (rev 9728)
@@ -305,7 +305,7 @@
 <!ENTITY less-ch6-du "3.5 MB">
 <!ENTITY less-ch6-sbu "less than 0.1 SBU">
 
-<!ENTITY lfs-bootscripts-version "20120127">                 <!-- Scripts depend on this format -->
+<!ENTITY lfs-bootscripts-version "20120204">                 <!-- Scripts depend on this format -->
 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">         <!-- Updated in Makefile -->
 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
 <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM">           <!-- Updated in Makefile -->




More information about the lfs-book mailing list