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
This commit is contained in:
Bruce Dubbs 2012-02-05 06:05:45 +00:00
parent 841b7235aa
commit 2f0d64dc59
8 changed files with 27 additions and 12 deletions

View File

@ -30,7 +30,7 @@
. /lib/lsb/init-functions . /lib/lsb/init-functions
# Function to create files/directory on boot. # Function to create files/directory on boot.
function create_files() create_files()
{ {
# Input to file descriptor 9 and output to stdin (redirection) # Input to file descriptor 9 and output to stdin (redirection)
exec 9>&0 < /etc/sysconfig/createfiles exec 9>&0 < /etc/sysconfig/createfiles

View File

@ -62,7 +62,7 @@ case "${1}" in
stop) stop)
# Don't unmount tmpfs like /run # Don't unmount tmpfs like /run
log_info_msg "Unmounting all other currently mounted file systems..." 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 evaluate_retval
exit 0 exit 0
;; ;;

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
######################################################################## ########################################################################
# Begin rc # Begin rc
# #
@ -14,7 +14,7 @@
. /lib/lsb/init-functions . /lib/lsb/init-functions
function print_error_msg() print_error_msg()
{ {
log_failure_msg log_failure_msg
# $i is set when called # $i is set when called
@ -33,7 +33,7 @@ function print_error_msg()
wait_for_user wait_for_user
} }
function check_script_status() check_script_status()
{ {
# $i is set when called # $i is set when called
if [ ! -f ${i} ]; then if [ ! -f ${i} ]; then
@ -47,7 +47,7 @@ function check_script_status()
fi fi
} }
function run() run()
{ {
if [ -z $interactive ]; then if [ -z $interactive ]; then
${1} ${2} ${1} ${2}

View File

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

View File

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

View File

@ -40,6 +40,21 @@
<listitem> <listitem>
<para>2012-02-04</para> <para>2012-02-04</para>
<itemizedlist> <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> <listitem>
<para>[bryan] - Fix up text in section 7.4 ("device and module <para>[bryan] - Fix up text in section 7.4 ("device and module
handling"), and change the recommendation for wrapper modules to handling"), and change the recommendation for wrapper modules to

View File

@ -51,7 +51,7 @@ done</userinput></screen>
<para>Now, inspect the <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> <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> 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 <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 NIC. The first line for each NIC is a commented description showing its

View File

@ -305,7 +305,7 @@
<!ENTITY less-ch6-du "3.5 MB"> <!ENTITY less-ch6-du "3.5 MB">
<!ENTITY less-ch6-sbu "less than 0.1 SBU"> <!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-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile -->
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2"> <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile --> <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile -->