aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootscripts/lfs/init.d/sysklogd7
-rw-r--r--bootscripts/lfs/lib/services/init-functions56
-rw-r--r--chapter01/changelog.xml16
-rw-r--r--chapter05/stripping.xml4
-rw-r--r--chapter07/usage.xml2
-rw-r--r--general.ent4
-rw-r--r--packages.ent2
7 files changed, 83 insertions, 8 deletions
diff --git a/bootscripts/lfs/init.d/sysklogd b/bootscripts/lfs/init.d/sysklogd
index 72e349744..eb76dfc13 100644
--- a/bootscripts/lfs/init.d/sysklogd
+++ b/bootscripts/lfs/init.d/sysklogd
@@ -63,8 +63,13 @@ case "${1}" in
${0} start
;;
+ status)
+ statusproc /sbin/syslogd
+ statusproc klogd
+ ;;
+
*)
- echo "Usage: ${0} {start|stop|reload|restart}"
+ echo "Usage: ${0} {start|stop|reload|restart|status}"
exit 1
;;
esac
diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions
index 93931dca9..4ba623adc 100644
--- a/bootscripts/lfs/lib/services/init-functions
+++ b/bootscripts/lfs/lib/services/init-functions
@@ -417,7 +417,12 @@ pidofproc()
if [ -z "${pidfile}" ]; then
# Get the program's basename
prefix=`echo "${program}" | sed 's/[^/]*$//'`
- progname=`echo "${program}" | sed "s@${prefix}@@"`
+
+ if [ -z "${prefix}" ]; then
+ progname="${program}"
+ else
+ progname=`echo "${program}" | sed "s@${prefix}@@"`
+ fi
# If a PID file exists with that name, assume that is it.
if [ -e "/var/run/${progname}.pid" ]; then
@@ -457,6 +462,55 @@ pidofproc()
}
################################################################################
+# statusproc() #
+# Usage: statusproc [-p pidfile] pathname #
+# #
+# Purpose: This function prints the status of a particular daemon to stdout #
+# #
+# Inputs: -p pidfile, use the specified pidfile instead of pidof #
+# pathname, path to the specified program #
+# #
+# Return values: #
+# 0 - Status printed #
+# 1 - Input error. The daemon to check was not specified. #
+################################################################################
+statusproc()
+{
+ if [ "${#}" = "0" ]; then
+ echo "Usage: statusproc {program}"
+ exit 1
+ fi
+
+ if [ -z "${PIDFILE}" ]; then
+ pidlist=`pidofproc -p "${PIDFILE}" $@`
+ else
+ pidlist=`pidofproc $@`
+ fi
+
+ # Trim trailing blanks
+ pidlist=`echo "${pidlist}" | sed -r 's/ +$//'`
+
+ base="${1##*/}"
+
+ if [ -n "${pidlist}" ]; then
+ echo -e "${INFO}${base} is running with Process" \
+ "ID(s) ${pidlist}.${NORMAL}"
+ else
+ if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then
+ echo -e "${WARNING}${1} is not running but" \
+ "/var/run/${base}.pid exists.${NORMAL}"
+ else
+ if [ -n "${PIDFILE}" -a -e "${PIDFILE}" ]; then
+ echo -e "${WARNING}${1} is not running" \
+ "but ${PIDFILE} exists.${NORMAL}"
+ else
+ echo -e "${INFO}${1} is not running.${NORMAL}"
+ fi
+ fi
+ fi
+}
+
+################################################################################
# timespec() #
# #
# Purpose: An internal utility function to format a timestamp #
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index bf5a84b98..e651c2fd8 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -37,6 +37,22 @@
-->
<listitem>
+ <para>2011-10-17</para>
+ <itemizedlist>
+ <listitem>
+ <para>[bdubbs] - Add statusproc back to bootscripts.</para>
+ </listitem>
+ <listitem>
+ <para>[bdubbs] - Also remove doc/ files when stripping in Chapter 5.
+ </para>
+ </listitem>
+ <listitem>
+ <para>[bdubbs] - Add --noclear to agetty for tty1 in inittab.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>2011-10-13</para>
<itemizedlist>
<listitem>
diff --git a/chapter05/stripping.xml b/chapter05/stripping.xml
index 916ad6596..5a1de46a2 100644
--- a/chapter05/stripping.xml
+++ b/chapter05/stripping.xml
@@ -26,9 +26,9 @@ strip --strip-unneeded /tools/{,s}bin/*</userinput></screen>
ones would be destroyed and the toolchain packages would need to be
built all over again.</para>
- <para>To save nearly 25 MB more, remove the documentation:</para>
+ <para>To save more, remove the documentation:</para>
-<screen><userinput>rm -rf /tools/{,share}/{info,man}</userinput></screen>
+<screen><userinput>rm -rf /tools/{,share}/{info,man,doc}</userinput></screen>
<para>At this point, you should have at least 850 MB of free space in
<envar>$LFS</envar> that can be used to build and install Glibc in the
diff --git a/chapter07/usage.xml b/chapter07/usage.xml
index 259c839e4..c2e7290be 100644
--- a/chapter07/usage.xml
+++ b/chapter07/usage.xml
@@ -73,7 +73,7 @@ ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
su:S016:once:/sbin/sulogin
-1:2345:respawn:/sbin/agetty tty1 9600
+1:2345:respawn:/sbin/agetty --noclear tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
diff --git a/general.ent b/general.ent
index 1ad58b61b..bc7bbedc5 100644
--- a/general.ent
+++ b/general.ent
@@ -1,5 +1,5 @@
-<!ENTITY version "SVN-20111013">
-<!ENTITY releasedate "Oct 13, 2011">
+<!ENTITY version "SVN-20111017">
+<!ENTITY releasedate "Oct 17, 2011">
<!ENTITY copyrightdate "1999-2011"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "7.0">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
diff --git a/packages.ent b/packages.ent
index 9f144847d..fbc35161f 100644
--- a/packages.ent
+++ b/packages.ent
@@ -298,7 +298,7 @@
<!ENTITY less-ch6-du "3.5 MB">
<!ENTITY less-ch6-sbu "less than 0.1 SBU">
-<!ENTITY lfs-bootscripts-version "20111008"> <!-- Scripts depend on this format -->
+<!ENTITY lfs-bootscripts-version "20111017"> <!-- 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 -->