mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
Add statusproc back to bootscripts.
Remove doc/ files when stripping in Chapter 5. Add --noclear to agetty for tty1 in inittab. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9636 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
a09cad523a
commit
776f1dc3a4
@ -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
|
||||
|
@ -417,7 +417,12 @@ pidofproc()
|
||||
if [ -z "${pidfile}" ]; then
|
||||
# Get the program's basename
|
||||
prefix=`echo "${program}" | sed 's/[^/]*$//'`
|
||||
|
||||
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
|
||||
@ -456,6 +461,55 @@ pidofproc()
|
||||
fi
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# 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() #
|
||||
# #
|
||||
|
@ -36,6 +36,22 @@
|
||||
</listitem>
|
||||
|
||||
-->
|
||||
<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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 – -->
|
||||
<!ENTITY milestone "7.0">
|
||||
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
|
||||
|
@ -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 -->
|
||||
|
Loading…
Reference in New Issue
Block a user