aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2012-01-27 20:39:49 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2012-01-27 20:39:49 +0000
commitbd899fb2652b66bb206c14c77716064490cf30c1 (patch)
tree2f612e4ca838795dac850143662aea3a44703f5f
parent661b74414696d154bdc3f90ed4dda3615d3bdb7f (diff)
Update scripts to support BLFS bridge devices.
Cosmetic cleanups git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9716 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--bootscripts/lfs/lib/services/init-functions14
-rwxr-xr-xbootscripts/lfs/lib/services/ipv4-static13
-rwxr-xr-xbootscripts/lfs/sbin/ifdown32
-rwxr-xr-xbootscripts/lfs/sbin/ifup54
-rw-r--r--chapter01/changelog.xml4
-rw-r--r--chapter06/coreutils.xml5
-rw-r--r--chapter06/glib.xml173
-rw-r--r--chapter06/pkg-config.xml109
-rw-r--r--general.ent4
-rw-r--r--packages.ent2
10 files changed, 76 insertions, 334 deletions
diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions
index 9b200b414..a830a3ae6 100644
--- a/bootscripts/lfs/lib/services/init-functions
+++ b/bootscripts/lfs/lib/services/init-functions
@@ -67,6 +67,10 @@ SUCCESS_PREFIX="${SUCCESS} * ${NORMAL}"
FAILURE_PREFIX="${FAILURE}*****${NORMAL}"
WARNING_PREFIX="${WARNING} *** ${NORMAL}"
+SUCCESS_SUFFIX="${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
+FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
+
BOOTLOG=/run/var/bootlog
KILLDELAY=3
@@ -567,7 +571,7 @@ timespec()
log_success_msg()
{
echo -n -e "${BMPREFIX}${@}"
- echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
+ echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
# Strip non-printable characters from log file
local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
@@ -581,7 +585,7 @@ log_success_msg()
log_success_msg2()
{
echo -n -e "${BMPREFIX}${@}"
- echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
+ echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
echo " OK" >> ${BOOTLOG}
@@ -602,7 +606,7 @@ log_success_msg2()
log_failure_msg()
{
echo -n -e "${BMPREFIX}${@}"
- echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+ echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
# Strip non-printable characters from log file
@@ -616,7 +620,7 @@ log_failure_msg()
log_failure_msg2()
{
echo -n -e "${BMPREFIX}${@}"
- echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+ echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
echo "FAIL" >> ${BOOTLOG}
@@ -635,7 +639,7 @@ log_failure_msg2()
log_warning_msg()
{
echo -n -e "${BMPREFIX}${@}"
- echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
+ echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}"
# Strip non-printable characters from log file
local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
diff --git a/bootscripts/lfs/lib/services/ipv4-static b/bootscripts/lfs/lib/services/ipv4-static
index 5a5693d09..16c5e473e 100755
--- a/bootscripts/lfs/lib/services/ipv4-static
+++ b/bootscripts/lfs/lib/services/ipv4-static
@@ -42,8 +42,13 @@ fi
case "${2}" in
up)
- if [ "$(ip addr show ${1} | grep ${IP})" == "" ]; then
- log_info_msg2 "\n" # Terminate the previous message
+ if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP})" == "" ]; then
+
+ # Cosmetic output not needed for multiple services
+ if ! $(echo ${SERVICE} | grep -q " "); then
+ log_info_msg2 "\n" # Terminate the previous message
+ fi
+
log_info_msg "Adding IPv4 address ${IP} to the ${1} interface..."
ip addr add ${args} dev ${1}
evaluate_retval
@@ -64,7 +69,7 @@ case "${2}" in
;;
down)
- if [ "$(ip addr show ${1} | grep ${IP})" != "" ]; then
+ if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP})" != "" ]; then
log_info_msg "Removing IPv4 address ${IP} from the ${1} interface..."
ip addr del ${args} dev ${1}
evaluate_retval
@@ -72,7 +77,7 @@ case "${2}" in
if [ -n "${GATEWAY}" ]; then
# Only remove the gateway if ther are no remaining ipv4 addresses
- if [ "$(ip addr show ${1} | grep 'inet ')" != "" ]; then
+ if [ "$(ip addr show ${1} 2>/dev/null | grep 'inet ')" != "" ]; then
log_info_msg "Removing default gateway..."
ip route del default
evaluate_retval
diff --git a/bootscripts/lfs/sbin/ifdown b/bootscripts/lfs/sbin/ifdown
index 0ec9867f3..8feba6729 100755
--- a/bootscripts/lfs/sbin/ifdown
+++ b/bootscripts/lfs/sbin/ifdown
@@ -67,20 +67,26 @@ if [ "$IFACE" = "" ]; then
exit 1
fi
-# This will run the service script, if SERVICE is set
-if [ -n "${SERVICE}" -a -x "/lib/services/${SERVICE}" ]; then
- if ip link show ${IFACE} > /dev/null 2>&1; then
- IFCONFIG=${file} /lib/services/${SERVICE} ${IFACE} down
- else
- log_warning_msg "Interface ${1} doesn't exist."
- echo_warning
- fi
+# Reverse the order
+SERVICES=
+for S in ${SERVICE}; do SERVICES="${SERVICES} ${S}"; done
+
+# This will run the service scripts
+if ip link show ${IFACE} > /dev/null 2>&1; then
+ for S in ${SERVICES}; do
+
+ if [ -n "${S}" -a -x "/lib/services/${S}" ]; then
+ IFCONFIG=${file} /lib/services/${S} ${IFACE} down
+ else
+ MSG="Unable to process ${file}. Either "
+ MSG="${MSG}the SERVICE variable was not set "
+ MSG="${MSG}or the specified service cannot be executed."
+ log_failure_msg "$MSG"
+ exit 1
+ fi
+ done
else
- MSG="Unable to process ${file}. Either "
- MSG="${MSG}the SERVICE variable was not set"
- MSG="${MSG}or the specified service cannot be executed."
- log_failure_msg "$MSG"
- exit 1
+ log_warning_msg "Interface ${1} doesn't exist."
fi
link_status=`ip link show ${IFACE} 2>/dev/null`
diff --git a/bootscripts/lfs/sbin/ifup b/bootscripts/lfs/sbin/ifup
index 42afadfce..2e3d88e49 100755
--- a/bootscripts/lfs/sbin/ifup
+++ b/bootscripts/lfs/sbin/ifup
@@ -55,7 +55,7 @@ file=/etc/sysconfig/ifconfig.${1}
. /lib/lsb/init-functions
-log_info_msg "Bringing up the ${1} interface: "
+log_info_msg "Bringing up the ${1} interface... "
if [ ! -r "${file}" ]; then
log_warning_msg "\n${file} is missing or cannot be accessed."
@@ -76,35 +76,39 @@ if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
exit 0
fi
-if [ -n "${SERVICE}" -a -x "/lib/services/${SERVICE}" ]; then
- if [ -z "${CHECK_LINK}" -o \
- "${CHECK_LINK}" = "y" -o \
- "${CHECK_LINK}" = "yes" -o \
- "${CHECK_LINK}" = "1" ]; then
+for S in ${SERVICES}; do
+ if [ ! -n "${S}" -o ! -x "/lib/services/${S}" ]; then
+ MSG="\nUnable to process ${file}. Either "
+ MSG="${MSG}the SERVICE variable was not set "
+ MSG="${MSG}or the specified service cannot be executed."
+ log_failure_msg "$MSG"
+ exit 1
+ fi
+done
- # Bring up the interface
- if ip link show ${IFACE} > /dev/null 2>&1; then
- link_status=`ip link show ${IFACE}`
+if [ -z "${CHECK_LINK}" -o \
+ "${CHECK_LINK}" = "y" -o \
+ "${CHECK_LINK}" = "yes" -o \
+ "${CHECK_LINK}" = "1" ]; then
- if [ -n "${link_status}" ]; then
- if ! echo "${link_status}" | grep -q UP; then
- ip link set ${IFACE} up
- fi
- fi
+ # Bring up the interface
+ if ip link show ${IFACE} > /dev/null 2>&1; then
+ link_status=`ip link show ${IFACE}`
- else
- log_warning_msg "\nInterface ${IFACE} doesn't exist."
+ if [ -n "${link_status}" ]; then
+ if ! echo "${link_status}" | grep -q UP; then
+ ip link set ${IFACE} up
+ fi
fi
- fi
-
- IFCONFIG=${file} /lib/services/${SERVICE} ${IFACE} up
-else
- MSG="\nUnable to process ${file}. Either "
- MSG="${MSG}the SERVICE variable was not set "
- MSG="${MSG}or the specified service cannot be executed."
- log_failure_msg "$MSG"
- exit 1
+ else
+ log_warning_msg "\nInterface ${IFACE} doesn't exist."
+ exit 0
+ fi
fi
+for S in ${SERVICE}; do
+ IFCONFIG=${file} /lib/services/${S} ${IFACE} up
+done
+
# End /sbin/ifup
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index b4879c875..ffa5bc697 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -41,6 +41,10 @@
<para>2012-01-22</para>
<itemizedlist>
<listitem>
+ <para>[bdubbs] - Update network bootscripts to support bridge
+ devices in BLFS.</para>
+ </listitem>
+ <listitem>
<para>[matthew] - Upgrade to Linux-3.2.1. Fixes
<ulink url="&lfs-ticket-root;2999">#2999</ulink>.</para>
</listitem>
diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml
index 226a1d9bd..1d0edba88 100644
--- a/chapter06/coreutils.xml
+++ b/chapter06/coreutils.xml
@@ -64,8 +64,9 @@ esac</userinput></screen>
<para>Now prepare Coreutils for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib \
---enable-no-install-program=kill,uptime</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --enable-no-install-program=kill,uptime</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
diff --git a/chapter06/glib.xml b/chapter06/glib.xml
deleted file mode 100644
index 25689e915..000000000
--- a/chapter06/glib.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-
-<sect1 id="ch-system-glib" role="wrap">
- <?dbhtml filename="glib.html"?>
-
- <sect1info condition="script">
- <productname>glib</productname>
- <productnumber>&glib-version;</productnumber>
- <address>&glib-url;</address>
- </sect1info>
-
- <title>Glib-&glib-version;</title>
-
- <indexterm zone="ch-system-glib">
- <primary sortas="a-Glib">Glib</primary>
- </indexterm>
-
- <sect2 role="package">
- <title/>
-
- <para>The GLib package contains a low-level core library. This is useful
- for providing data structure handling for C, portability wrappers and
- interfaces for such runtime functionality as an event loop, threads,
- dynamic loading, and an object system.</para>
-
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
-
- <seglistitem>
- <seg>&glib-ch6-sbu;</seg>
- <seg>&glib-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
-
- </sect2>
-
- <sect2 role="installation">
- <title>Installation of Glib</title>
-
- <para>Prepare Glib for compilation:</para>
-
-<screen><userinput remap="configure">PCRE_LIBS="-L/usr/lib -lpcre" PCRE_CFLAGS="-I/usr/include" \
-./configure --prefix=/usr --sysconfdir=/etc --with-pcre=system</userinput></screen>
-
- <variablelist>
- <title>The meaning of the configure options:</title>
-
- <varlistentry>
- <term><parameter>--with-pcre=system</parameter></term>
- <listitem>
- <para>This parameter causes the build to use a system-provided
- version of the PCRE library instead of an internal version.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
- <para>Due to dependencies on additional Perl modules and other packages not yet present
- (e.g. desktop-file-utils and DBus), it is not possible to run Glib's test suite.</para>
-
- <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
- </sect2>
-
- <sect2 id="contents-glib" role="content">
- <title>Contents of Glib</title>
-
- <segmentedlist>
- <segtitle>Installed programs</segtitle>
- <segtitle>Installed libraries</segtitle>
- <segtitle>Installed directories</segtitle>
-
- <seglistitem>
- <seg>gio-querymodules, glib-genmarshal, glib-gettextize,
- glib-mkenums, gobject-query, gtester and gtester-report</seg>
- <seg>libgio-2.0.so, libglib-2.0.so, libgmodule-2.0.so,
- libgobject-2.0.so, and libgthread-2.0.so</seg>
- <seg>/usr/include/{gio-unix-2.0/gio,glib-2.0/{gio,glib,gobject}},
- /usr/lib/{gio/modules,glib-2.0/include},
- /usr/share/{gdb/auto-load,glib-2.0/{gdb, gettext/po},gtk-doc/html/{gio,glib,gobject}}</seg>
- </seglistitem>
- </segmentedlist>
-
- <variablelist>
- <bridgehead renderas="sect3">Short Descriptions</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
-
- <varlistentry id="gio-querymodules">
- <term><command>gio-querymodules</command></term>
- <listitem>
- <para>is a C code marshaller generation utility for GLib
- closures.</para>
- <indexterm zone="ch-system-glib gio-querymodules">
- <primary sortas="b-glib">gio-querymodules</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- <varlistentry id="glib-gettextize">
- <term><command>glib-gettextize</command></term>
- <listitem>
- <para>is a variant of the gettext internationalization
- utility.</para>
- <indexterm zone="ch-system-glib glib-gettextize">
- <primary sortas="b-glib-gettextize">glib-gettextize</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- <varlistentry id="glib-mkenums">
- <term><command>glib-mkenums</command></term>
- <listitem>
- <para>is a C language enum description generation utility.</para>
- <indexterm zone="ch-system-glib glib-mkenums">
- <primary sortas="b-glib-mkenums">glib-mkenums</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- <varlistentry id="gobject-query">
- <term><command>gobject-query</command></term>
- <listitem>
- <para>Is a small utility that draws a tree of types.</para>
- <indexterm zone="ch-system-glib gobject-query">
- <primary sortas="b-gobject-query">gobject-query</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- <varlistentry id="gtester">
- <term><command>gtester</command></term>
- <listitem>
- <para>Is a test running utility.</para>
- <indexterm zone="ch-system-glib gtester">
- <primary sortas="b-gtester">gtester</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- <varlistentry id="gtester-report">
- <term><command>gtester-report</command></term>
- <listitem>
- <para>Is a test report formatting utility.</para>
- <indexterm zone="ch-system-glib gtester-report">
- <primary sortas="b-gtester-report">gtester-report</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- <varlistentry id="glib">
- <term><filename class="libraryfile">Glib libraries</filename></term>
- <listitem>
- <para>contain a general purpose low-level core library.</para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </sect2>
-
-</sect1>
diff --git a/chapter06/pkg-config.xml b/chapter06/pkg-config.xml
deleted file mode 100644
index 13a98b396..000000000
--- a/chapter06/pkg-config.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-
-<sect1 id="ch-system-pkg-config" role="wrap">
- <?dbhtml filename="pkg-config.html"?>
-
- <sect1info condition="script">
- <productname>pkg-config</productname>
- <productnumber>&pkg-config-version;</productnumber>
- <address>&pkg-config-url;</address>
- </sect1info>
-
- <title>Pkg-config-&pkg-config-version;</title>
-
- <indexterm zone="ch-system-pkg-config">
- <primary sortas="a-Pkg-config">Pkg-config</primary>
- </indexterm>
-
- <sect2 role="package">
- <title/>
-
- <para>The pkg-config package contains a tool for passing the include path
- and/or library paths to build tools during the configure and make file
- execution.</para>
-
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
-
- <seglistitem>
- <seg>&pkg-config-ch6-sbu;</seg>
- <seg>&pkg-config-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
-
- </sect2>
-
- <sect2 role="installation">
- <title>Installation of Pkg-config</title>
-
- <note><para>Pkg-Config will use an included version of Popt to parse
- command line options. If an external version of Popt is desired, install
- that version using the <ulink
- url="&blfs-root;view/svn/general/popt.html">BLFS Popt build
- instructions</ulink> before installing Pkg-config.</para></note>
-
-
- <para>Fix a problem with one of Pkg-config's tests:</para>
-
-<screen><userinput remap="pre">sed -i -e '/!done/a\
- longArg = NULL;' popt/popt.c</userinput></screen>
-
- <para>Prepare Pkg-config for compilation:</para>
-
-<screen><userinput remap="configure">GLIB_LIBS="-L/usr/lib -lglib-2.0" \
- GLIB_CFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
- ./configure --prefix=/usr</userinput></screen>
-
- <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
- <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
- <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
- </sect2>
-
-
- <sect2 id="contents-pkg-config" role="content">
- <title>Contents of Pkg-config</title>
-
- <segmentedlist>
- <segtitle>Installed program</segtitle>
-
- <seglistitem>
- <seg>pkg-config</seg>
- </seglistitem>
- </segmentedlist>
-
- <variablelist>
- <bridgehead renderas="sect3">Short Descriptions</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
-
- <varlistentry id="pkg-config">
- <term><command>pkg-config</command></term>
- <listitem>
- <para>Returns meta information for the specified library or
- package.</para>
- <indexterm zone="ch-system-pkg-config pkg-config">
- <primary sortas="b-pkg-config">pkg-config</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </sect2>
-
-</sect1>
diff --git a/general.ent b/general.ent
index c2c0e402a..c28144454 100644
--- a/general.ent
+++ b/general.ent
@@ -1,5 +1,5 @@
-<!ENTITY version "SVN-20120126">
-<!ENTITY releasedate "Jan 26, 2012">
+<!ENTITY version "SVN-20120127">
+<!ENTITY releasedate "Jan 27, 2012">
<!ENTITY copyrightdate "1999-2012"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "7.1">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
diff --git a/packages.ent b/packages.ent
index 2f0fbd01a..b09b7e55e 100644
--- a/packages.ent
+++ b/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 "20120122"> <!-- Scripts depend on this format -->
+<!ENTITY lfs-bootscripts-version "20120127"> <!-- 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 -->