Ver Fonte

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.



git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9728 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Bruce Dubbs há 13 anos atrás
pai
commit
2f0d64dc59

+ 1 - 1
bootscripts/lfs/init.d/cleanfs

@@ -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

+ 1 - 1
bootscripts/lfs/init.d/mountfs

@@ -62,7 +62,7 @@ case "${1}" in
    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
       ;;

+ 4 - 4
bootscripts/lfs/init.d/rc

@@ -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 @@ function print_error_msg()
    wait_for_user
 }
 
-function check_script_status()
+check_script_status()
 {
    # $i is set when called
    if [ ! -f ${i} ]; then
@@ -47,7 +47,7 @@ function check_script_status()
    fi
 }
 
-function run()
+run()
 {
    if [ -z $interactive ]; then
       ${1} ${2}

+ 3 - 3
bootscripts/lfs/lib/services/init-functions

@@ -457,7 +457,7 @@ pidofproc()
         kill -0 ${pid} 2> /dev/null
 
         if [ "${?}" -eq "0" ]; then
-            lpids="${pids}${pid} "
+            lpids="${lpids}${pid} "
         else
             exitstatus="1"
         fi
@@ -490,7 +490,7 @@ statusproc()
    local pidlist
 
    if [ "${#}" = "0" ]; then
-      echo "Usage: [-p pidfle] statusproc {program}"
+      echo "Usage: statusproc [-p pidfle] {program}"
       exit 1
    fi
 
@@ -514,7 +514,7 @@ statusproc()
        esac
    done
 
-   if [ -z "${pidfile}" ]; then
+   if [ -n "${pidfile}" ]; then
       pidlist=`pidofproc -p "${pidfile}" $@`
    else
       pidlist=`pidofproc $@`

+ 1 - 1
bootscripts/lfs/sbin/ifdown

@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/sh 
 ########################################################################
 # Begin /sbin/ifdown
 #

+ 15 - 0
chapter01/changelog.xml

@@ -40,6 +40,21 @@
     <listitem>
       <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

+ 1 - 1
chapter07/network.xml

@@ -51,7 +51,7 @@ done</userinput></screen>
     <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

+ 1 - 1
packages.ent

@@ -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 -->