[lfs-fr] r1418 - in trunk/lfs: . appendices bootscripts bootscripts/lfs bootscripts/lfs/init.d bootscripts/lfs/lib bootscripts/lfs/lib/services bootscripts/lfs/sbin bootscripts/lfs/sysconfig chapter01 chapter05 chapter06 chapter07

jmengual at linuxfromscratch.org jmengual at linuxfromscratch.org
Lun 19 Sep 09:22:31 PDT 2011


Author: jmengual
Date: 2011-09-19 18:22:31 +0200 (Mon, 19 Sep 2011)
New Revision: 1418

Added:
   trunk/lfs/bootscripts/lfs/lib/
   trunk/lfs/bootscripts/lfs/lib/services/
   trunk/lfs/bootscripts/lfs/lib/services/init-functions
   trunk/lfs/bootscripts/lfs/lib/services/ipv4-static
   trunk/lfs/bootscripts/lfs/lib/services/ipv4-static-route
   trunk/lfs/bootscripts/lfs/sbin/
   trunk/lfs/bootscripts/lfs/sbin/ifdown
   trunk/lfs/bootscripts/lfs/sbin/ifup
   trunk/lfs/bootscripts/lfs/sbin/ifup.8
   trunk/lfs/bootscripts/lfs/sysconfig/rc.site
   trunk/lfs/chapter07/site.xml
Removed:
   trunk/lfs/bootscripts/lfs/sysconfig/network-devices/
Modified:
   trunk/lfs/appendices/scripts.xml
   trunk/lfs/bootscripts/ChangeLog
   trunk/lfs/bootscripts/Makefile
   trunk/lfs/bootscripts/README
   trunk/lfs/bootscripts/lfs/init.d/checkfs
   trunk/lfs/bootscripts/lfs/init.d/cleanfs
   trunk/lfs/bootscripts/lfs/init.d/console
   trunk/lfs/bootscripts/lfs/init.d/consolelog
   trunk/lfs/bootscripts/lfs/init.d/functions
   trunk/lfs/bootscripts/lfs/init.d/halt
   trunk/lfs/bootscripts/lfs/init.d/localnet
   trunk/lfs/bootscripts/lfs/init.d/modules
   trunk/lfs/bootscripts/lfs/init.d/mountfs
   trunk/lfs/bootscripts/lfs/init.d/mountvirtfs
   trunk/lfs/bootscripts/lfs/init.d/network
   trunk/lfs/bootscripts/lfs/init.d/rc
   trunk/lfs/bootscripts/lfs/init.d/reboot
   trunk/lfs/bootscripts/lfs/init.d/sendsignals
   trunk/lfs/bootscripts/lfs/init.d/setclock
   trunk/lfs/bootscripts/lfs/init.d/swap
   trunk/lfs/bootscripts/lfs/init.d/sysctl
   trunk/lfs/bootscripts/lfs/init.d/sysklogd
   trunk/lfs/bootscripts/lfs/init.d/template
   trunk/lfs/bootscripts/lfs/init.d/udev
   trunk/lfs/bootscripts/lfs/init.d/udev_retry
   trunk/lfs/bootscripts/lfs/sysconfig/createfiles
   trunk/lfs/bootscripts/lfs/sysconfig/rc
   trunk/lfs/chapter01/changelog.xml
   trunk/lfs/chapter05/binutils-pass2.xml
   trunk/lfs/chapter06/udev.xml
   trunk/lfs/chapter07/bootscripts.xml
   trunk/lfs/chapter07/chapter07.xml
   trunk/lfs/chapter07/network.xml
   trunk/lfs/chapter07/setclock.xml
   trunk/lfs/chapter07/sysklogd.xml
   trunk/lfs/chapter07/usage.xml
   trunk/lfs/general.ent
   trunk/lfs/packages.ent
   trunk/lfs/process-scripts.sh
Log:
Plusieurs modifications.


Modified: trunk/lfs/appendices/scripts.xml
===================================================================
--- trunk/lfs/appendices/scripts.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/appendices/scripts.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -10,6 +10,7 @@
   <!ENTITY functions          SYSTEM "functions.script"> 
   <!ENTITY consolelog         SYSTEM "consolelog.script"> 
   <!ENTITY halt               SYSTEM "halt.script"> 
+  <!ENTITY initfunctions      SYSTEM "init-functions.script"> 
   <!ENTITY localnet           SYSTEM "localnet.script"> 
   <!ENTITY modules            SYSTEM "modules.script"> 
   <!ENTITY mountfs            SYSTEM "mountfs.script"> 
@@ -64,6 +65,11 @@
     <screen>&rc;</screen> 
   </sect1>
 
+  <sect1 id="init-functions" role="wrap">
+    <title>/lib/lsb/init-functions</title>
+    <screen>&initfunctions;</screen> 
+  </sect1>
+
   <sect1 id="functions" role="wrap">
     <title>/etc/rc.d/init.d/functions</title>
     <screen>&functions;</screen> 
@@ -180,22 +186,22 @@
   </sect1>
 
   <sect1 id="ifup" role="wrap">
-    <title>/etc/sysconfig/network-devices/ifup</title>
+    <title>/sbin/ifup</title>
     <screen>&ifup;</screen> 
   </sect1>
 
   <sect1 id="ifdown" role="wrap">
-    <title>/etc/sysconfig/network-devices/ifdown</title>
+    <title>/sbin/ifdown</title>
     <screen>&ifdown;</screen> 
   </sect1>
 
   <sect1 id="ipv4static" role="wrap">
-    <title>/etc/sysconfig/network-devices/services/ipv4-static</title>
+    <title>/lib/services/ipv4-static</title>
     <screen>&ipv4_static;</screen> 
   </sect1>
 
   <sect1 id="ipv4route" role="wrap">
-    <title>/etc/sysconfig/network-devices/services/ipv4-static-route</title>
+    <title>/lib/services/ipv4-static-route</title>
     <screen>&ipv4_static_route;</screen> 
   </sect1>
 

Modified: trunk/lfs/bootscripts/ChangeLog
===================================================================
--- trunk/lfs/bootscripts/ChangeLog	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/ChangeLog	2011-09-19 16:22:31 UTC (rev 1418)
@@ -1,3 +1,18 @@
+2100-09-18
+   * Review and update of changes made in previous change.
+   ** Rename /etc/sysconfig/init_params to /etc/sysconfig/rc.site.
+   ** Move network services to /lib/services.
+   ** Move init-functions to /lib/lsb.
+   *** /lib/lsb is a symlink to /lib/services.
+   * Create convenience symlink /etc/init.d->/etc/rc.d/init.d.
+   * Add help and man pages to upup/ifdown.
+   * Append /run/var/bootlog to /var/log/boot.log at the end of 
+     the boot sequence.
+   * Add capabiltiy to step through the boot scripts at boot time
+   * Optionally allow environment variables in sysconfig directory's 
+     console, network, and clock files to be placed in rc.site.
+   * Add an optional FASTBOOT parameter to set /fastboot when rebooting.
+
 2011-07-14  Bruce Dubbs <bdubbs at linuxfromscratch.org>
    * Major rewrite of all LFS scripts
    ** Move ifup/ifdown to /sbin

Modified: trunk/lfs/bootscripts/Makefile
===================================================================
--- trunk/lfs/bootscripts/Makefile	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/Makefile	2011-09-19 16:22:31 UTC (rev 1418)
@@ -1,33 +1,37 @@
 ETCDIR=/etc
 EXTDIR=${DESTDIR}${ETCDIR}
-LIBDIR=${DESTDIR}/lib/boot
+LIBDIR=${DESTDIR}/lib/services
+MAN8=/usr/share/man/man8
 MODE=754
 DIRMODE=755
 CONFMODE=644
 
-all: install
+all: links
 
+install: all
+
 create-dirs:
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc0.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc1.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc2.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc3.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc4.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc5.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc6.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rcsysinit.d
-	install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
-	install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
-	install -d -m ${DIRMODE} ${LIBDIR}
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc0.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc1.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc2.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc3.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc4.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc5.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc6.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rcS.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/init.d
+	install -d -m ${DIRMODE}  ${EXTDIR}/sysconfig
+	install -d -m ${DIRMODE}  ${LIBDIR}
+	ln -svf       services    ${DESTDIR}/lib/lsb
+	ln -sf        rc.d/init.d ${EXTDIR}/init.d
 
-install: create-dirs 
+files: create-dirs 
 	install -m ${MODE} lfs/init.d/checkfs       ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/cleanfs       ${EXTDIR}/rc.d/init.d/
-	install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
-	install -m ${CONFMODE} lfs/init.d/functions ${LIBDIR}
 	install -m ${MODE} lfs/init.d/halt          ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/console       ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/consolelog    ${EXTDIR}/rc.d/init.d/
+	install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/localnet      ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/modules       ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/mountfs       ${EXTDIR}/rc.d/init.d/
@@ -37,12 +41,49 @@
 	install -m ${MODE} lfs/init.d/reboot        ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/sendsignals   ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/setclock      ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/sysklogd      ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/swap          ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/sysctl        ${EXTDIR}/rc.d/init.d/
+	install -m ${MODE} lfs/init.d/sysklogd      ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/template      ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/udev          ${EXTDIR}/rc.d/init.d/
 	install -m ${MODE} lfs/init.d/udev_retry    ${EXTDIR}/rc.d/init.d/
+	install -m ${MODE} lfs/sbin/ifup            /sbin
+	install -m ${MODE} lfs/sbin/ifdown          /sbin
+	install -m ${MODE} lfs/sbin/ifup.8          ${MAN8}
+	ln -sf ifup.8                               ${MAN8}/ifdown.8
+	install -m ${MODE} lfs/lib/services/ipv4-static-route  ${LIBDIR}
+	install -m ${MODE} lfs/lib/services/ipv4-static        ${LIBDIR}
+	install -m ${CONFMODE} lfs/lib/services/init-functions ${LIBDIR}
+	if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then \
+     install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/ ;\
+   fi
+	if [ ! -f ${EXTDIR}/sysconfig/modules     ]; then \
+     install -m ${CONFMODE} lfs/sysconfig/modules     ${EXTDIR}/sysconfig/ ;\
+   fi
+	if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then \
+     install -m ${CONFMODE} lfs/sysconfig/rc          ${EXTDIR}/sysconfig/ ;\
+   fi
+	if [ ! -f ${EXTDIR}/sysconfig/rc.site     ]; then \
+     install -m ${CONFMODE} lfs/sysconfig/rc.site     ${EXTDIR}/sysconfig/ ;\
+   fi
+
+links: files rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
+
+rcS:
+	ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcS.d/S00mountvirtfs
+	ln -sf ../init.d/consolelog  ${EXTDIR}/rc.d/rcS.d/S02consolelog
+	ln -sf ../init.d/modules     ${EXTDIR}/rc.d/rcS.d/S05modules
+	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcS.d/S08localnet
+	ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcS.d/S10udev
+	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcS.d/S20swap
+	ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcS.d/S30checkfs
+	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcS.d/S40mountfs
+	ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcS.d/S45cleanfs
+	ln -sf ../init.d/udev_retry  ${EXTDIR}/rc.d/rcS.d/S50udev_retry
+	ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcS.d/S70console
+	ln -sf ../init.d/sysctl      ${EXTDIR}/rc.d/rcS.d/S90sysctl
+
+rc0:
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc0.d/K80network
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc0.d/K90sysklogd
 	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
@@ -50,16 +91,28 @@
 	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc0.d/S80swap
 	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc0.d/S90localnet
 	ln -sf ../init.d/halt        ${EXTDIR}/rc.d/rc0.d/S99halt
+
+rc1:
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc1.d/K80network
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc1.d/K90sysklogd
+
+rc2:
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc2.d/K80network
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc2.d/K90sysklogd
+
+rc3:
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc3.d/S10sysklogd
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc3.d/S20network
+
+rc4:
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc4.d/S10sysklogd
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc4.d/S20network
+
+rc5:
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc5.d/S10sysklogd
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc5.d/S20network
+
+rc6:
 	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc6.d/K80network
 	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc6.d/K90sysklogd
 	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
@@ -67,68 +120,6 @@
 	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc6.d/S80swap
 	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc6.d/S90localnet
 	ln -sf ../init.d/reboot      ${EXTDIR}/rc.d/rc6.d/S99reboot
-	ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs
-	ln -sf ../init.d/consolelog  ${EXTDIR}/rc.d/rcsysinit.d/S02consolelog
-	ln -sf ../init.d/modules     ${EXTDIR}/rc.d/rcsysinit.d/S05modules
-	ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcsysinit.d/S10udev
-	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcsysinit.d/S20swap
-	ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
-	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
-	ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
-	ln -sf ../init.d/udev_retry  ${EXTDIR}/rc.d/rcsysinit.d/S50udev_retry
-	ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcsysinit.d/S70console
-	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
-	ln -sf ../init.d/sysctl      ${EXTDIR}/rc.d/rcsysinit.d/S90sysctl
-	if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then \
-     install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/ ;\
-   fi
-	if [ ! -f ${EXTDIR}/sysconfig/modules     ]; then \
-     install -m ${CONFMODE} lfs/sysconfig/modules     ${EXTDIR}/sysconfig/ ;\
-   fi
-	if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then \
-     install -m ${CONFMODE} lfs/sysconfig/rc          ${EXTDIR}/sysconfig/ ;\
-   fi
-	install -m ${MODE} lfs/sysconfig/network-devices/ifup   /sbin
-	install -m ${MODE} lfs/sysconfig/network-devices/ifdown /sbin
-	install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static       ${LIBDIR}
-	install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static-route ${LIBDIR}
 
-install-consolelog: create-dirs
-	install -m ${MODE} contrib/init.d/consolelog   ${EXTDIR}/rc.d/init.d
-	ln -sf ../init.d/consolelog  ${EXTDIR}/rc.d/rcsysinit.d/S00consolelog
+.PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
 
-minimal: create-dirs 
-	install -m ${MODE} lfs/init.d/checkfs       ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/cleanfs       ${EXTDIR}/rc.d/init.d/
-	install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
-	install -m ${CONFMODE} lfs/init.d/functions ${LIBDIR}
-	install -m ${MODE} lfs/init.d/halt          ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/localnet      ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/mountfs       ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/mountvirtfs   ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/rc            ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/reboot        ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/sendsignals   ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/setclock      ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/swap          ${EXTDIR}/rc.d/init.d/
-	install -m ${MODE} lfs/init.d/udev          ${EXTDIR}/rc.d/init.d/
-	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
-	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc0.d/S70mountfs
-	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc0.d/S80swap
-	ln -sf ../init.d/halt        ${EXTDIR}/rc.d/rc0.d/S99halt
-	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
-	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc6.d/S70mountfs
-	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc6.d/S80swap
-	ln -sf ../init.d/reboot      ${EXTDIR}/rc.d/rc6.d/S99reboot
-	ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs
-	ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcsysinit.d/S10udev
-	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcsysinit.d/S20swap
-	ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
-	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
-	ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
-	if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then \
-      install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; \
-   fi
-
-.PHONY: all create-dirs install 
-

Modified: trunk/lfs/bootscripts/README
===================================================================
--- trunk/lfs/bootscripts/README	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/README	2011-09-19 16:22:31 UTC (rev 1418)
@@ -1,49 +1,44 @@
 Network Configuration:
    Script Files:
-      /etc/rc.d/init.d/network
+      /etc/rc.d/init.d/*
       /sbin/ifup
       /sbin/ifdown
-      /lib/boot/*/*
+      /lib/lsb/*
 
    Configuration Files:
       /etc/sysconfig/ifconfig.*
-      Note: ifconfig.* could be either a file or directory,
-            but the filename extension must be the same name
-            as the network interface you wish it to belong to.
-            The files within the directory will be processed
-            in alphanumerical order on boot, and reversed on
-            shutdown.
-      - IFACE: the interface that is being configured (e.g. eth0)
-      - SERVICE: which script to run in services directory.
-      - ONBOOT: if set to yes, this interface will be started on
-                bootup, and stopped on shutdown
+      Note: ifconfig.* files will be processed
+            in alphanumerical order on boot, and reversed on shutdown.
+      - IFACE  : The interface that is being configured (e.g. eth0)
+      - SERVICE: Which script to run in services directory.
+      - ONBOOT : If set to yes, this interface will be started on bootup
 
       /etc/sysconfig/network
-      - HOSTNAME: Value of the system's hostname
+      - HOSTNAME: Value of the system's hostname  (From LFS Book)
+                  This value may also be set in /etc/sysconfig/rc.site
 
    Additional Configuration:
-      ipv4-static:
-      - IP: static IP Address
-      - GATEWAY: Specifies the IP Address of the gateway server
-      - PREFIX: CIDR prefix of IP Address, defaults to 24 if not set
-      - PEER: IP Address of peer (for point-to-point connections and tunnels)
-      - BROADCAST: broadcast address
+      SERVICE ipv4-static:
+      - IP       : Static IP Address
+      - GATEWAY  : Specifies the IP Address of the gateway server
+      - PREFIX   : CIDR prefix of IP Address, defaults to 24 if not set
+      - PEER     : IP Address of peer (for point-to-point connections and tunnels)
+      - BROADCAST: Broadcast address
 
-      ipv4-static-route:
-      - TYPE: network (default type if not specified), default, host or
-        unreachable
-      - IP: IP Address of target (for network, host and unreachable)
-      - PREFIX: CIDR prefix of target (for network, host and unreachable)
+      SERVICE ipv4-static-route:
+      - TYPE   : Network (default type if not specified), default, host or unreachable
+      - IP     : IP Address of target (for network, host and unreachable)
+      - PREFIX : CIDR prefix of target (for network, host and unreachable)
       - GATEWAY: IP Address of gateway to reach target (for network and default)
 
 
 SetClock configuration:
-   Script Files:
-      /etc/rc.d/init.d/setclock
+
+      /etc/rc.d/init.d/cleanfs
       - SKIPTMPCLEAN: skips cleaning of /tmp directory
 
    Configuration Files:
-      /etc/sysconfig/clock
+      /etc/sysconfig/clock or /etc/sysconfig/rc.site
       - UTC: 1 assumes hwclock is in UTC
              0 assumes hwclock is in local time
       - CLOCKPARAMS: any additional options to be passed to hwclock

Modified: trunk/lfs/bootscripts/lfs/init.d/checkfs
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/checkfs	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/checkfs	2011-09-19 16:22:31 UTC (rev 1418)
@@ -6,6 +6,7 @@
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
 #               A. Luebke - luebke at users.sourceforge.net
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -37,101 +38,102 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
       if [ -f /fastboot ]; then
-         boot_mesg -n "/fastboot found, will not perform" ${INFO}
-         boot_mesg " file system checks as requested."
-         echo_ok
+         msg="/fastboot found, will omit "
+         msg="${msg} file system checks as requested.\n"
+         log_info_msg "${msg}"
          exit 0
       fi
 
-      boot_mesg "Mounting root file system in read-only mode..."
+      log_info_msg "Mounting root file system in read-only mode... "
       mount -n -o remount,ro / >/dev/null
-      evaluate_retval
 
       if [ ${?} != 0 ]; then
-         echo_failure
-         boot_mesg -n "FAILURE:\n\nCannot check root" ${FAILURE}
-         boot_mesg -n " filesystem because it could not be mounted"
-         boot_mesg -n " in read-only mode.\n\nAfter you"
-         boot_mesg -n " press Enter, this system will be"
-         boot_mesg -n " halted and powered off."
-         boot_mesg -n "\n\nPress enter to continue..." ${INFO}
-         boot_mesg "" ${NORMAL}
+         log_failure_msg2
+         msg="\n\nCannot check root "
+         msg="${msg}filesystem because it could not be mounted "
+         msg="${msg}in read-only mode.\n\n"
+         msg="${msg}After you press Enter, this system will be "
+         msg="${msg}halted and powered off.\n\n"
+         log_failure_msg "${msg}"
+
+         log_info_msg "Press Enter to continue..." 
          wait_for_user
          /etc/rc.d/init.d/halt stop
+      else
+         log_success_msg2
       fi
 
       if [ -f /forcefsck ]; then
-         boot_mesg -n "/forcefsck found, forcing file" ${INFO}
-         boot_mesg " system checks as requested."
-         echo_ok
+         msg="\n/forcefsck found, forcing file" 
+         msg="${msg} system checks as requested."
+         log_success_msg "$msg"
          options="-f"
       else
          options=""
       fi
 
-      boot_mesg "Checking file systems..."
-      # Note: -a option used to be -p; but this fails e.g.
-      # on fsck.minix
+      log_info_msg "Checking file systems..."
+      # Note: -a option used to be -p; but this fails e.g. on fsck.minix
       fsck ${options} -a -A -C -T
       error_value=${?}
 
       if [ "${error_value}" = 0 ]; then
-         echo_ok
+         log_success_msg2
       fi
 
       if [ "${error_value}" = 1 ]; then
-         echo_warning
-         boot_mesg -n "WARNING:\n\nFile system errors" ${WARNING}
-         boot_mesg -n " were found and have been corrected. "
-         boot_mesg -n " You may want to double-check that"
-         boot_mesg -n " everything was fixed properly."
-         boot_mesg "" ${NORMAL}
+         msg="\nWARNING:\n\nFile system errors "
+         msg="${msg}were found and have been corrected.\n"
+         msg="${msg}You may want to double-check that "
+         msg="${msg}everything was fixed properly."
+         log_warning_msg "$msg"
       fi
 
       if [ "${error_value}" = 2 -o "${error_value}" = 3 ]; then
-         echo_warning
-         boot_mesg -n "WARNING:\n\nFile system errors" ${WARNING}
-         boot_mesg -n " were found and have been been"
-         boot_mesg -n " corrected, but the nature of the"
-         boot_mesg -n " errors require this system to be"
-         boot_mesg -n " rebooted.\n\nAfter you press enter,"
-         boot_mesg -n " this system will be rebooted"
-         boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
-         boot_mesg "" ${NORMAL}
+         msg="\nWARNING:\n\nFile system errors "
+         msg="${msg}were found and have been been "
+         msg="${msg}corrected, but the nature of the "
+         msg="${msg}errors require this system to be rebooted.\n\n"
+         msg="${msg}After you press enter, "
+         msg="${msg}this system will be rebooted\n\n"
+         log_failure_msg "$msg"
+
+         log_info_msg "Press Enter to continue..." 
          wait_for_user
          reboot -f
       fi
 
       if [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then
-         echo_failure
-         boot_mesg -n "FAILURE:\n\nFile system errors" ${FAILURE}
-         boot_mesg -n " were encountered that could not be"
-         boot_mesg -n " fixed automatically.  This system"
-         boot_mesg -n " cannot continue to boot and will"
-         boot_mesg -n " therefore be halted until those"
-         boot_mesg -n " errors are fixed manually by a"
-         boot_mesg -n " System Administrator.\n\nAfter you"
-         boot_mesg -n " press Enter, this system will be"
-         boot_mesg -n " halted and powered off."
-         boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
-         boot_mesg "" ${NORMAL}
+         msg="\nFAILURE:\n\nFile system errors "
+         msg="${msg}were encountered that could not be "
+         msg="${msg}fixed automatically.  This system "
+         msg="${msg}cannot continue to boot and will "
+         msg="${msg}therefore be halted until those "
+         msg="${msg}errors are fixed manually by a "
+         msg="${msg}System Administrator.\n\n"
+         msg="${msg}After you press Enter, this system will be "
+         msg="${msg}halted and powered off.\n\n"
+         log_failure_msg "$msg"
+
+         log_info_msg "Press Enter to continue..." 
          wait_for_user
-        /etc/rc.d/init.d/halt stop
+         /etc/rc.d/init.d/halt stop
       fi
 
       if [ "${error_value}" -ge 16 ]; then
-         echo_failure
-         boot_mesg -n "FAILURE:\n\nUnexpected Failure" ${FAILURE}
-         boot_mesg -n " running fsck.  Exited with error"
-         boot_mesg -n " code: ${error_value}."
-         boot_mesg "" ${NORMAL}
+         msg="\nFAILURE:\n\nUnexpected Failure "
+         msg="${msg}running fsck.  Exited with error "
+         msg="${msg} code: ${error_value}."
+         log_failure_msg $msg
          exit ${error_value}
       fi
+
+      exit 0
       ;;
    *)
       echo "Usage: ${0} {start}"

Modified: trunk/lfs/bootscripts/lfs/init.d/cleanfs
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/cleanfs	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/cleanfs	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Clean file system
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -26,67 +27,70 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 # Function to create files/directory on boot.
-create_files() {
-   # Read in the configuration file.
+function create_files() 
+{
+   # Input to file descriptor 9 and output to stdin (redirection)
    exec 9>&0 < /etc/sysconfig/createfiles
-      while read name type perm usr grp dtype maj min junk
-      do
-         # Ignore comments and blank lines.
-               case "${name}" in
-            ""|\#*) continue ;;
+
+   while read name type perm usr grp dtype maj min junk
+   do
+      # Ignore comments and blank lines.
+      case "${name}" in
+         ""|\#*) continue ;;
+      esac
+
+      # Ignore existing files.
+      if [ ! -e "${name}" ]; then
+         # Create stuff based on its type.
+         case "${type}" in
+            dir)
+               mkdir "${name}"
+               ;;
+            file)
+               :> "${name}"
+               ;;
+            dev)
+               case "${dtype}" in
+                  char)
+                     mknod "${name}" c ${maj} ${min}
+                     ;;
+                  block)
+                     mknod "${name}" b ${maj} ${min}
+                     ;;
+                  pipe)
+                     mknod "${name}" p
+                     ;;
+                  *) 
+                     log_warning_msg "\nUnknown device type: ${dtype}" 
+                     ;;
+               esac
+               ;;
+            *)
+               log_warning_msg "\nUnknown type: ${type}" 
+               continue
+               ;;
          esac
 
-         # Ignore existing files.
-         if [ ! -e "${name}" ]; then
-            # Create stuff based on its type.
-            case "${type}" in
-               dir)
-                  mkdir "${name}"
-                  ;;
-               file)
-                  :> "${name}"
-                  ;;
-               dev)
-                  case "${dtype}" in
-                     char)
-                        mknod "${name}" c ${maj} ${min}
-                        ;;
-                     block)
-                        mknod "${name}" b ${maj} ${min}
-                        ;;
-                     pipe)
-                        mknod "${name}" p
-                        ;;
-                     *) 
-                        boot_mesg -n "\nUnknown device type: ${dtype}" ${WARNING}
-                        boot_mesg "" ${NORMAL}
-                        ;;
-                  esac
-                  ;;
-               *)
-                  boot_mesg -n "\nUnknown type: ${type}" ${WARNING}
-                  boot_mesg "" ${NORMAL}
-                  continue
-                  ;;
-            esac
+         # Set up the permissions, too.
+         chown ${usr}:${grp} "${name}"
+         chmod ${perm} "${name}"
+      fi
+   done
 
-            # Set up the permissions, too.
-            chown ${usr}:${grp} "${name}"
-            chmod ${perm} "${name}"
-         fi
-      done
+   # Close file descriptor 9 (end redirection)
    exec 0>&9 9>&-
+   return 0
 }
 
 case "${1}" in
    start)
-      boot_mesg -n "Cleaning file systems:" ${INFO}
+      log_info_msg "Cleaning file systems:" 
 
       if [ "${SKIPTMPCLEAN}" = "" ]; then
-         boot_mesg -n " /tmp" ${NORMAL}
+         log_info_msg2 "\n /tmp" 
          cd /tmp &&
          find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
       fi
@@ -102,10 +106,12 @@
       evaluate_retval
 
       if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; then
-         boot_mesg "Creating files and directories..."
-         create_files
+         log_info_msg "Creating files and directories... "
+         create_files      # Always returns 0
          evaluate_retval
       fi
+
+      exit $failed
       ;;
    *)
       echo "Usage: ${0} {start}"

Modified: trunk/lfs/bootscripts/lfs/init.d/console
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/console	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/console	2011-09-19 16:22:31 UTC (rev 1418)
@@ -6,14 +6,13 @@
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
 #               Alexander E. Patrakov
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
 #
 ########################################################################
 
-. /lib/boot/functions
-
 ### BEGIN INIT INFO
 # Provides:            console
 # Required-Start:
@@ -28,37 +27,43 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
+. /lib/lsb/init-functions
+
 # Native English speakers probably don't have /etc/sysconfig/console at all
-if [ -r /etc/sysconfig/console ]; then
-   . /etc/sysconfig/console
-else
-   exit 0
-fi
+[ -r /etc/sysconfig/console ] && . /etc/sysconfig/console
 
-is_true() {
+function is_true() 
+{
    [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
 }
 
+# See if we need to do anything
+if [ -z "${KEYMAP}"         ] && [ -z "${KEYMAP_CORRECTIONS}" ] &&
+   [ -z "${FONT}"           ] && [ is_true "${UNICODE}"       ] &&
+   [ -z "${LEGACY_CHARSET}" ]; then 
+   exit 0
+fi
+
 failed=0
 
 case "${1}" in
    start)
-      boot_mesg "Setting up Linux console..."
       # There should be no bogus failures below this line!
+      log_info_msg "Setting up Linux console..."
 
       # Figure out if a framebuffer console is used
-      [ -d /sys/class/graphics/fb0 ] && USE_FB=1 || USE_FB=0
+      [ -d /sys/class/graphics/fb0 ] && use_fb=1 || use_fb=0
 
       # Figure out the command to set the console into the
       # desired mode
       is_true "${UNICODE}" &&
-         MODE_COMMAND="${ECHO} -en '\033%G' && kbd_mode -u" ||
-         MODE_COMMAND="${ECHO} -en '\033%@\033(K' && kbd_mode -a"
+         MODE_COMMAND="echo -en '\033%G' && kbd_mode -u" ||
+         MODE_COMMAND="echo -en '\033%@\033(K' && kbd_mode -a"
 
       # On framebuffer consoles, font has to be set for each vt in
       # UTF-8 mode. This doesn't hurt in non-UTF-8 mode also.
 
-      ! is_true "${USE_FB}" || [ -z "${FONT}" ] ||
+      ! is_true "${use_fb}" || [ -z "${FONT}" ] ||
          MODE_COMMAND="${MODE_COMMAND} && setfont ${FONT}"
 
       # Apply that command to all consoles mentioned in
@@ -66,8 +71,6 @@
       # happen before setfont, otherwise a kernel bug will
       # show up and the unicode map of the font will not be
       # used.
-      # FIXME: Fedora Core also initializes two spare consoles
-      # - do we want that?
 
       for TTY in `grep '^[^#].*respawn:/sbin/agetty' /etc/inittab |
          grep -o '\btty[[:digit:]]*\b'`
@@ -77,31 +80,33 @@
       done
 
       # Set the font (if not already set above) and the keymap
-      is_true "${USE_FB}" || [ -z "${FONT}" ] ||
-         setfont $FONT ||
-         failed=1
+      [ "${use_fb}" == "1" || [ -z "${FONT}" ] || setfont $FONT || failed=1
+
       [ -z "${KEYMAP}" ] ||
          loadkeys ${KEYMAP} >/dev/null 2>&1 ||
          failed=1
+      
       [ -z "${KEYMAP_CORRECTIONS}" ] ||
          loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 ||
          failed=1
 
       # Convert the keymap from $LEGACY_CHARSET to UTF-8
       [ -z "$LEGACY_CHARSET" ] ||
-         dumpkeys -c "$LEGACY_CHARSET" |
-         loadkeys -u >/dev/null 2>&1 ||
+         dumpkeys -c "$LEGACY_CHARSET" | loadkeys -u >/dev/null 2>&1 ||
          failed=1
 
       # If any of the commands above failed, the trap at the
       # top would set $failed to 1
-      ( exit $failed )
+      ( exit $failed ) 
       evaluate_retval
-      ;;
-   *)
-      echo $"Usage:" "${0} {start}"
-      exit 1
-      ;;
+
+      exit $failed
+      ;;              
+
+   *)                 
+      echo $"Usage:"  "${0} {start}"
+      exit 1          
+      ;;              
 esac
 
 # End console

Modified: trunk/lfs/bootscripts/lfs/init.d/consolelog
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/consolelog	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/consolelog	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,7 +5,8 @@
 # Description : Set the kernel log level for the console
 #
 # Authors     : Dan Nicholson - dnicholson at linuxfromscratch.org
-# Authors     : Gerard Beekmans  - gerard at linuxfromscratch.org
+#               Gerard Beekmans  - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -27,25 +28,28 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
-# set the default loglevel
-LOGLEVEL=7
+# set the default loglevel if needed
+LOGLEVEL=${LOGLEVEL:-7}
 
-[ -r /etc/sysconfig/console ] &&  . /etc/sysconfig/console
+[ -r /etc/sysconfig/console ] && . /etc/sysconfig/console
 
 case "${1}" in
    start)
       case "$LOGLEVEL" in
       [1-8])
-         boot_mesg "Setting the console log level to ${LOGLEVEL}..."
+         log_info_msg "Setting the console log level to ${LOGLEVEL}..."
          dmesg -n $LOGLEVEL
          evaluate_retval
+         exit 0
          ;;
+
       *)
-         boot_mesg "Console log level '${LOGLEVEL}' is invalid" ${FAILURE}
-         echo_failure
+         log_failure_msg "Console log level '${LOGLEVEL}' is invalid"
+         exit 1
          ;;
+      
       esac
       ;;
 
@@ -54,13 +58,14 @@
       if [ -r /proc/sys/kernel/printk ]; then
          read level line < /proc/sys/kernel/printk
       else
-         boot_mesg "Can't read the current console log level" ${FAILURE}
-         echo_failure
+         log_failure_msg "Can't read the current console log level"
+         exit 1
       fi
 
       # Print the value
       if [ -n "$level" ]; then
-         ${ECHO} -e "${INFO}The current console log level is ${level}${NORMAL}"
+         log_info_msg "The current console log level is ${level}\n"
+         exit 0
       fi
       ;;
 

Modified: trunk/lfs/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/functions	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/functions	2011-09-19 16:22:31 UTC (rev 1418)
@@ -12,12 +12,12 @@
 # Notes       : With code based on Matthias Benkmann's simpleinit-msb
 #               http://winterdrache.de/linux/newboot/index.html
 #
-#               The file should be located in /lib/boot
+#               This file is only present for backward BLFS compatibility
 #
 ########################################################################
 
 # Set any needed environment variables e.g. HEADLESS
-[ -r /etc/sysconfig/init_params ]  && . /etc/sysconfig/init_params
+. /lib/lsb/init_params
 
 ## Environmental setup
 # Setup default values for environment

Modified: trunk/lfs/bootscripts/lfs/init.d/halt
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/halt	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/halt	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Halt Script
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0

Modified: trunk/lfs/bootscripts/lfs/init.d/localnet
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/localnet	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/localnet	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Loopback device
 #
 # Authors     : Gerard Beekmans  - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -25,23 +26,23 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
-. /etc/sysconfig/network
+. /lib/lsb/init-functions
+[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
 
 case "${1}" in
    start)
-      boot_mesg "Bringing up the loopback interface..."
+      log_info_msg "Bringing up the loopback interface..."
       ip addr add 127.0.0.1/8 label lo dev lo
       ip link set lo up
       evaluate_retval
 
-      boot_mesg "Setting hostname to ${HOSTNAME}..."
+      log_info_msg "Setting hostname to ${HOSTNAME}..."
       hostname ${HOSTNAME}
       evaluate_retval
       ;;
 
    stop)
-      boot_mesg "Bringing down the loopback interface..."
+      log_info_msg "Bringing down the loopback interface..."
       ip link set lo down
       evaluate_retval
       ;;
@@ -63,4 +64,6 @@
       ;;
 esac
 
+exit 0
+
 # End localnet

Modified: trunk/lfs/bootscripts/lfs/init.d/modules
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/modules	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/modules	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Module auto-loading script
 #
 # Authors     : Zack Winkles
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -24,23 +25,23 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
-
 # Assure that the kernel has module support.
 [ -e /proc/ksyms -o -e /proc/modules ] || exit 0
 
+. /lib/lsb/init-functions
+
 case "${1}" in
    start)
       # Exit if there's no modules file or there are no
       # valid entries
-      [ -r /etc/sysconfig/modules ] &&
-         egrep -qv '^($|#)' /etc/sysconfig/modules ||
-         exit 0
+      [ -r /etc/sysconfig/modules ]                    || exit 0
+      [ $(egrep -qv '^($|#)' /etc/sysconfig/modules) ] || exit 0
 
-      boot_mesg -n "Loading modules:" ${INFO}
+      log_info_msg "Loading modules:" 
 
       # Only try to load modules if the user has actually given us
       # some modules to load.
+
       while read module args; do
 
          # Ignore comments and blank lines.
@@ -48,29 +49,25 @@
             ""|"#"*) continue ;;
          esac
 
-         # Attempt to load the module, making
-         # sure to pass any arguments provided.
+         # Attempt to load the module, passing any arguments provided.
          modprobe ${module} ${args} >/dev/null
 
-         # Print the module name if successful,
-         # otherwise take note.
+         # Print the module name if successful, otherwise take note.
          if [ $? -eq 0 ]; then
-            boot_mesg -n " ${module}" ${NORMAL}
+            log_info_msg2 " ${module}" 
          else
             failedmod="${failedmod} ${module}"
          fi
       done < /etc/sysconfig/modules
 
-      boot_mesg "" ${NORMAL}
-      # Print a message about successfully loaded
-      # modules on the correct line.
-      echo_ok
+      # Print a message about successfully loaded modules on the correct line.
+      log_success_msg2
 
-      # Print a failure message with a list of any
-      # modules that may have failed to load.
+      # Print a failure message with a list of any modules that 
+      # may have failed to load.
       if [ -n "${failedmod}" ]; then
-         boot_mesg "Failed to load modules:${failedmod}" ${FAILURE}
-         echo_failure
+         log_failure_msg "Failed to load modules:${failedmod}" 
+         exit 1
       fi
       ;;
 
@@ -80,4 +77,6 @@
       ;;
 esac
 
+exit 0
+
 # End modules

Modified: trunk/lfs/bootscripts/lfs/init.d/mountfs
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/mountfs	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/mountfs	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : File System Mount Script
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -27,18 +28,18 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
-      boot_mesg "Remounting root file system in read-write mode..."
+      log_info_msg "Remounting root file system in read-write mode..."
       mount -n -o remount,rw / >/dev/null
       evaluate_retval
 
       # Remove fsck-related file system watermarks.
       rm -f /fastboot /forcefsck
 
-      boot_mesg "Recording existing mounts in /etc/mtab..."
+      log_info_msg "Recording existing mounts in /etc/mtab..."
       > /etc/mtab
 
       mount -f /     || failed=1
@@ -50,15 +51,19 @@
 
       # This will mount all filesystems that do not have _netdev in
       # their option list.  _netdev denotes a network filesystem.
-      boot_mesg "Mounting remaining file systems..."
+
+      log_info_msg "Mounting remaining file systems..."
       mount -a -O no_netdev >/dev/null
       evaluate_retval
+      exit $failed
       ;;
 
    stop)
-      boot_mesg "Unmounting all other currently mounted file systems..."
+      # Don't unmount tmpfs like /run
+      log_info_msg "Unmounting all other currently mounted file systems..."
       umount -a -d -r -t notmpfs >/dev/null
       evaluate_retval
+      exit 0
       ;;
 
    *)

Modified: trunk/lfs/bootscripts/lfs/init.d/mountvirtfs
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/mountvirtfs	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/mountvirtfs	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Mount proc, sysfs, and run
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -26,32 +27,30 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
+      # Make sure /run/var is available before logging any messages
       mkdir -p /run
       mount -n /run || failed=1
       mkdir -p /run/{var,lock,shm}
 
+      log_info_msg "Mounting virtual file systems: /run" 
 
-      boot_mesg -n "Mounting virtual file systems:" ${INFO}
-      boot_mesg -n " /run" ${NORMAL}
-
       if ! mountpoint /proc >/dev/null; then
-         boot_mesg -n " /proc" ${NORMAL}
+         log_info_msg2 " /proc"
          mount -n /proc || failed=1
       fi
 
       if ! mountpoint /sys >/dev/null; then
-         boot_mesg -n " /sys" ${NORMAL}
+         log_info_msg2 " /sys" 
          mount -n /sys || failed=1
       fi
 
-      boot_mesg "" ${NORMAL}
-
       (exit ${failed})
       evaluate_retval
+      exit $failed
       ;;
 
    *)
@@ -60,4 +59,4 @@
       ;;
 esac
 
-# End mountvertfs
+# End mountvirtfs

Modified: trunk/lfs/bootscripts/lfs/init.d/network
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/network	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/network	2011-09-19 16:22:31 UTC (rev 1418)
@@ -7,6 +7,7 @@
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
 #               Nathan Coulson - nathan at linuxfromscratch.org
 #               Kevin P. Fleming - kpfleming at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -33,7 +34,7 @@
       do
          interface=${file##*/ifconfig.}
 
-         # skip if $file is * (because nothing was found)
+         # Skip if $file is * (because nothing was found)
          if [ "${interface}" = "*" ]
          then
             continue
@@ -45,18 +46,18 @@
 
    stop)
       # Reverse list
-      FILES=""
+      net_files=""
       for file in  /etc/sysconfig/ifconfig.*
       do
-         FILES="${file} ${FILES}"
+         net_files="${file} ${net_files}"
       done
 
       # Stop all network interfaces
-      for file in ${FILES}
+      for file in ${net_files}
       do
          interface=${file##*/ifconfig.}
 
-         # skip if $file is * (because nothing was found)
+         # Skip if $file is * (because nothing was found)
          if [ "${interface}" = "*" ]
          then
             continue
@@ -78,4 +79,6 @@
       ;;
 esac
 
+exit 0
+
 # End network

Modified: trunk/lfs/bootscripts/lfs/init.d/rc
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/rc	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/rc	2011-09-19 16:22:31 UTC (rev 1418)
@@ -1,56 +1,93 @@
-#!/bin/sh
+#!/bin/bash
 ########################################################################
 # Begin rc
 #
 # Description : Main Run Level Control Script
 #
 # Authors     : Gerard Beekmans  - gerard at linuxfromscratch.org
+#             : DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
 #
 ########################################################################
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
-print_error_msg()
+function print_error_msg()
 {
-   echo_failure
+   log_failure_msg
    # $i is set when called
-   boot_mesg -n "FAILURE:\n\nYou should not be reading this error message.\n\n" ${FAILURE}
-   boot_mesg -n " It means that an unforeseen error took"
-   boot_mesg -n " place in ${i}, which exited with a return value of"
-   boot_mesg " ${error_value}.\n"
-   boot_mesg_flush
-   boot_mesg -n "If you're able to track this"
-   boot_mesg -n " error down to a bug in one of the files provided by"
-   boot_mesg -n " the LFS book, please be so kind to inform us at"
-   boot_mesg " lfs-dev at linuxfromscratch.org.\n"
-   boot_mesg_flush
-   boot_mesg -n "Press Enter to continue..." ${INFO}
-   boot_mesg "" ${NORMAL}
+   MSG="FAILURE:\n\nYou should not be reading this error message.\n\n" 
+   MSG="${MSG}It means that an unforeseen error took place in\n"
+   MSG="${MSG}${i},\n"
+   MSG="${MSG}which exited with a return value of ${error_value}.\n"
+  
+   MSG="${MSG}If you're able to track this error down to a bug in one of\n"
+   MSG="${MSG}the files provided by the files provided by\n"
+   MSG="${MSG}the ${DISDRI_MINI} book, please be so kind to inform us at\n"
+   MSG="${MSG}${DISTRO_CONTACT}.\n"
+   log_failure_msg "${MSG}"
+
+   log_info_msg "Press Enter to continue..."
    wait_for_user
 }
 
-check_script_status()
+function check_script_status()
 {
    # $i is set when called
    if [ ! -f ${i} ]; then
-      boot_mesg "${i} is not a valid symlink." ${WARNING}
-      echo_warning
+      log_warning_msg "${i} is not a valid symlink." 
       continue
    fi
 
    if [ ! -x ${i} ]; then
-      boot_mesg "${i} is not executable, skipping." ${WARNING}
-      echo_warning
+      log_warning_msg "${i} is not executable, skipping."
       continue
    fi
 }
 
-# This sets a few default terminal options.
-stty sane
+function run()
+{
+   if [ -z $interactive ]; then
+      ${1} ${2}
+      return $?
+   fi
 
+   while true; do
+      read -p "Run ${1} ${2} (Yes/no/continue)? " -n 1 runit
+      echo
+
+      case ${runit} in
+         c | C)
+            interactive=""
+            ${i} ${2}
+            ret=${?}
+            break;
+            ;;
+
+         n | N)
+            return 0
+            ;;
+
+         y | Y)
+            ${i} ${2}
+            ret=${?}
+            break
+            ;;
+      esac
+   done
+
+   return $ret
+}
+
+# Read any local settings/overrides
+[ -r /etc/sysconfig/rc.site ] && source /etc/sysconfig/rc.site
+
+DISTRO=${DISTRO:-"Linux From Scratch"}
+DISTRO_CONTACT=${DISTRO_CONTACT:-"lfs-dev at linuxfromscratch.org (Registration required)"}
+DISTRO_MINI=${DISTRO_MINI:-"LFS"}
+
 # These 3 signals will not cause our script to exit
 trap "" INT QUIT TSTP
 
@@ -65,10 +102,29 @@
 [ "${previous}" = "" ] && previous=N
 
 if [ ! -d /etc/rc.d/rc${runlevel}.d ]; then
-   boot_mesg "/etc/rc.d/rc${runlevel}.d does not exist." 
+   log_info_msg "/etc/rc.d/rc${runlevel}.d does not exist.\n" 
    exit 1
 fi
 
+if [ "$runlevel" == "6" ] || [ "$runlevel" == "0" ]; then IPROMPT="no"; fi
+
+if [ "${IPROMPT}" == "yes" ]; then
+   # dcol and icol are spaces before the message to center the
+   # message on screen.
+
+   wcol=$(( ( ${COLUMNS} - ${wlen} ) / 2 ))
+   icol=$(( ( ${COLUMNS} - ${ilen} ) / 2 ))
+
+   echo -e "\\033[${wcol}G${welcome_message}"
+   echo -e "\\033[${icol}G${i_message}${NORMAL}"
+   echo ""
+   read -t "${itime}" -n 1 interactive 2>&1 > /dev/null
+
+   # Make lower case
+   [ "${interactive}" == "I" ] && interactive="i"
+   [ "${interactive}" != "i" ] && interactive=""
+fi
+
 # Attempt to stop all services started by the previous runlevel,
 # and killed in this runlevel
 if [ "${previous}" != "N" ]; then
@@ -78,34 +134,34 @@
 
       suffix=${i#/etc/rc.d/rc$runlevel.d/K[0-9][0-9]}
       prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix
-      sysinit_start=/etc/rc.d/rcsysinit.d/S[0-9][0-9]$suffix
+      sysinit_start=/etc/rc.d/rcS.d/S[0-9][0-9]$suffix
 
-      if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]; then
+      if [ "${runlevel}" != "0" ]  && [ "${runlevel}" != "6" ]; then
          if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]; then
-            boot_mesg -n "WARNING:\n\n${i} can't be" ${WARNING}
-            boot_mesg -n " executed because it was not"
-            boot_mesg -n " not started in the previous"
-            boot_mesg -n " runlevel (${previous})."
-            boot_mesg "" ${NORMAL}
-            boot_mesg_flush
+            MSG="WARNING:\n\n${i} can't be "
+            MSG="${MSG}executed because it was not "
+            MSG="${MSG}not started in the previous "
+            MSG="${MSG}runlevel (${previous})."
+            log_warning_msg "$MSG"
             continue
          fi
       fi
-      ${i} stop
+
+      run ${i} stop
       error_value=${?}
 
-      if [ "${error_value}" != "0" ]; then
-         print_error_msg
-      fi
+      if [ "${error_value}" != "0" ]; then print_error_msg; fi
    done
 fi
 
-if [ "${previous}" = "N" ]; then
-   IN_BOOT=1
-   export IN_BOOT
+if [ "${previous}" == "N" ]; then export IN_BOOT=1; fi
+
+if [ "$runlevel" == "6" ] && [ -n "${FASTBOOT}" ]; then
+   touch /fastboot
 fi
 
-#Start all functions in this runlevel
+
+# Start all functions in this runlevel
 for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null)
 do
    if [ "${previous}" != "N" ]; then
@@ -120,17 +176,22 @@
 
    case ${runlevel} in
       0|6)
-         ${i} stop
+         run ${i} stop
          ;;
       *)
-         ${i} start
+         run ${i} start
          ;;
    esac
+
    error_value=${?}
 
-   if [ "${error_value}" != "0" ]; then
-      print_error_msg
-   fi
+   if [ "${error_value}" != "0" ]; then print_error_msg; fi
 done
 
+# Copy the boot log on initial boot only
+if [ "${previous}" == "N" ]; then
+   cat /run/var/bootlog >> /var/log/boot.log
+   echo "--------" >> /var/log/boot.log  # Mark the end of boot
+fi
+
 # End rc

Modified: trunk/lfs/bootscripts/lfs/init.d/reboot
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/reboot	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/reboot	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Reboot Scripts
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -24,11 +25,11 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    stop)
-      boot_mesg "Restarting system..."
+      log_info_msg "Restarting system..."
       reboot -d -f -i
       ;;
 

Modified: trunk/lfs/bootscripts/lfs/init.d/sendsignals
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/sendsignals	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/sendsignals	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Sendsignals Script
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -24,32 +25,32 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot//functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    stop)
-      boot_mesg "Sending all processes the TERM signal..."
+      log_info_msg "Sending all processes the TERM signal..."
       killall5 -15
       error_value=${?}
 
       sleep ${KILLDELAY}
 
       if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
-         echo_ok
+         log_success_msg
       else
-         echo_failure
+         log_failure_msg
       fi
 
-      boot_mesg "Sending all processes the KILL signal..."
+      log_info_msg "Sending all processes the KILL signal..."
       killall5 -9
       error_value=${?}
 
       sleep ${KILLDELAY}
 
       if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
-         echo_ok
+         log_success_msg
       else
-         echo_failure
+         log_failure_msg
       fi
       ;;
 
@@ -60,4 +61,6 @@
 
 esac
 
+exit 0
+
 # End sendsignals

Modified: trunk/lfs/bootscripts/lfs/init.d/setclock
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/setclock	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/setclock	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Setting Linux Clock
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -25,9 +26,9 @@
 # X-LFS-Provided-By:   LFS BLFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
-[ -r /etc/sysconfig/clock ] &&  . /etc/sysconfig/clock
+[ -r /etc/sysconfig/clock ] && . /etc/sysconfig/clock
 
 
 case "${UTC}" in
@@ -43,19 +44,23 @@
 
 case ${1} in
    start)
-      boot_mesg "Setting system clock..."
+      log_info_msg2 "\n" # Run by udev, make sure start on new line
+      log_info_msg "Setting system clock..."
       hwclock --hctosys ${CLOCKPARAMS} >/dev/null
       evaluate_retval
       ;;
 
    stop)
-      boot_mesg "Setting hardware clock..."
+      log_info_msg "Setting hardware clock..."
       hwclock --systohc ${CLOCKPARAMS} >/dev/null
       evaluate_retval
       ;;
 
    *)
       echo "Usage: ${0} {start|stop}"
+      exit 1
       ;;
 
 esac
+
+exit 0

Modified: trunk/lfs/bootscripts/lfs/init.d/swap
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/swap	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/swap	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Swap Control Script
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -25,17 +26,17 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
-      boot_mesg "Activating all swap files/partitions..."
+      log_info_msg "Activating all swap files/partitions..."
       swapon -a
       evaluate_retval
       ;;
 
    stop)
-      boot_mesg "Deactivating all swap files/partitions..."
+      log_info_msg "Deactivating all swap files/partitions..."
       swapoff -a
       evaluate_retval
       ;;
@@ -47,9 +48,7 @@
       ;;
 
    status)
-      boot_mesg "Retrieving swap status." ${INFO}
-      echo_ok
-      echo
+      log_success_msg "Retrieving swap status." 
       swapon -s
       ;;
 
@@ -59,4 +58,6 @@
       ;;
 esac
 
+exit 0
+
 # End swap

Modified: trunk/lfs/bootscripts/lfs/init.d/sysctl
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/sysctl	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/sysctl	2011-09-19 16:22:31 UTC (rev 1418)
@@ -7,6 +7,7 @@
 #
 # Authors     : Nathan Coulson (nathan at linuxfromscratch.org)
 #               Matthew Burgress (matthew at linuxfromscratch.org)
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -27,12 +28,12 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
       if [ -f "/etc/sysctl.conf" ]; then
-         boot_mesg "Setting kernel runtime parameters..."
+         log_info_msg "Setting kernel runtime parameters..."
          sysctl -q -p
          evaluate_retval
       fi
@@ -48,4 +49,6 @@
       ;;
 esac
 
+exit 0
+
 # End sysctl

Modified: trunk/lfs/bootscripts/lfs/init.d/sysklogd
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/sysklogd	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/sysklogd	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Sysklogd loader
 #
 # Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -25,29 +26,35 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
-      boot_mesg "Starting system log daemon..."
-      PARMS=${SYSKLOGD_PARMS-'-m 0'}
-      loadproc syslogd $PARMS
+      log_info_msg "Starting system log daemon..."
+      parms=${SYSKLOGD_PARMS-'-m 0'}
+      start_daemon /sbin/syslogd $parms
+      evaluate_retval
 
-      boot_mesg "Starting kernel log daemon..."
-      loadproc klogd
+      log_info_msg "Starting kernel log daemon..."
+      start_daemon /sbin/klogd
+      evaluate_retval
       ;;
 
    stop)
-      boot_mesg "Stopping kernel log daemon..."
-      killproc klogd
+      log_info_msg "Stopping kernel log daemon..."
+      killproc /sbin/klogd
+      evaluate_retval
 
-      boot_mesg "Stopping system log daemon..."
-      killproc syslogd
+      log_info_msg "Stopping system log daemon..."
+      killproc /sbin/syslogd
+      evaluate_retval
       ;;
 
    reload)
-      boot_mesg "Reloading system log daemon config file..."
-      reloadproc syslogd
+      log_info_msg "Reloading system log daemon config file..."
+      pid=`pidofproc syslogd`
+      kill -HUP "${pid}"
+      evaluate_retval
       ;;
 
    restart)
@@ -56,15 +63,12 @@
       ${0} start
       ;;
 
-   status)
-      statusproc syslogd
-      statusproc klogd
-      ;;
-
    *)
-      echo "Usage: ${0} {start|stop|reload|restart|status}"
+      echo "Usage: ${0} {start|stop|reload|restart}"
       exit 1
       ;;
 esac
 
+exit 0
+
 # End sysklogd

Modified: trunk/lfs/bootscripts/lfs/init.d/template
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/template	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/template	2011-09-19 16:22:31 UTC (rev 1418)
@@ -25,38 +25,31 @@
 # X-LFS-Provided-By:
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
-      boot_mesg "Starting..."
-      loadproc
+      log_info_msg "Starting..."
+      start_daemon fully_qualified_path
       ;;
 
    stop)
-      boot_mesg "Stopping..."
-      killproc
+      log_info_msg "Stopping..."
+      killproc fully_qualified_path
       ;;
 
-   reload)
-      boot_mesg "Reloading..."
-      reloadproc
-      ;;
-
    restart)
       ${0} stop
       sleep 1
       ${0} start
       ;;
 
-   status)
-      statusproc
-      ;;
-
    *)
-      echo "Usage: ${0} {start|stop|reload|restart|status}"
+      echo "Usage: ${0} {start|stop|restart}"
       exit 1
       ;;
 esac
 
+exit 0
+
 # End scriptname

Modified: trunk/lfs/bootscripts/lfs/init.d/udev
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/udev	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/udev	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Udev cold-plugging script
 #
 # Authors     : Zack Winkles, Alexander E. Patrakov
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -25,19 +26,19 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
-      boot_mesg "Populating /dev with device nodes..."
+      log_info_msg "Populating /dev with device nodes... "
       if ! grep -q '[[:space:]]sysfs' /proc/mounts; then
-         echo_failure
-         boot_mesg -n "FAILURE:\n\nUnable to create" ${FAILURE}
-         boot_mesg -n " devices without a SysFS filesystem"
-         boot_mesg -n "\n\nAfter you press Enter, this system"
-         boot_mesg -n " will be halted and powered off."
-         boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
-         boot_mesg "" ${NORMAL}
+         log_failure_msg2
+         msg="FAILURE:\n\nUnable to create "
+         msg="${msg}devices without a SysFS filesystem\n\n"
+         msg="${msg}After you press Enter, this system "
+         msg="${msg}will be halted and powered off.\n\n"
+         log_info_msg "$msg"
+         log_info_msg "Press Enter to continue..."
          wait_for_user
          /etc/rc.d/init.d/halt stop
       fi
@@ -49,14 +50,15 @@
       if ! mountpoint /dev > /dev/null; then
          mount -n -t tmpfs tmpfs /dev -o mode=755
       fi
+
       if [ ${?} != 0 ]; then
-         echo_failure
-         boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" ${FAILURE}
-         boot_mesg -n " onto /dev, this system will be halted."
-         boot_mesg -n "\n\nAfter you press Enter, this system"
-         boot_mesg -n " will be halted and powered off."
-         boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
-         boot_mesg "" ${NORMAL}
+         log_failure_msg2
+         msg="FAILURE:\n\nCannot mount a tmpfs "
+         msg="${msg}onto /dev, this system will be halted.\n\n"
+         msg="${msg}After you press Enter, this system "
+         msg="${msg}will be halted and powered off.\n\n"
+         log_failure_msg "$msg"
+         log_info_msg "Press Enter to continue..."
          wait_for_user
          /etc/rc.d/init.d/halt stop
       fi
@@ -82,7 +84,7 @@
 
       # Now wait for udevd to process the uevents we triggered
       /sbin/udevadm settle
-      evaluate_retval
+      log_success_msg2 
       ;;
 
    *)
@@ -91,4 +93,6 @@
       ;;
 esac
 
+exit 0
+
 # End udev

Modified: trunk/lfs/bootscripts/lfs/init.d/udev_retry
===================================================================
--- trunk/lfs/bootscripts/lfs/init.d/udev_retry	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/init.d/udev_retry	2011-09-19 16:22:31 UTC (rev 1418)
@@ -5,6 +5,7 @@
 # Description : Udev cold-plugging script (retry)
 #
 # Authors     : Alexander E. Patrakov
+#               DJ Lucas - dj at linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
 #
 # Version     : LFS 7.0
@@ -26,17 +27,17 @@
 # X-LFS-Provided-By:   LFS
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
 case "${1}" in
    start)
-      boot_mesg "Retrying failed uevents, if any..."
+      log_info_msg "Retrying failed uevents, if any..."
 
-      RUNDIR=$(/sbin/udevadm info --run)
+      rundir=$(/sbin/udevadm info --run)
       # From Debian: "copy the rules generated before / was mounted
       # read-write":
     
-      for file in ${RUNDIR}/tmp-rules--*; do
+      for file in ${rundir}/tmp-rules--*; do
          dest=${file##*tmp-rules--}
          [ "$dest" = '*' ] && break
          cat $file >> /etc/udev/rules.d/$dest
@@ -57,4 +58,6 @@
       ;;
 esac
 
+exit 0
+
 # End udev_retry

Added: trunk/lfs/bootscripts/lfs/lib/services/init-functions
===================================================================
--- trunk/lfs/bootscripts/lfs/lib/services/init-functions	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/lib/services/init-functions	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,677 @@
+#!/bin/sh
+########################################################################
+# 
+# Begin /lib/lsb/init-funtions
+#
+# Description : Run Level Control Functions
+#
+# Authors     : Gerard Beekmans - gerard at linuxfromscratch.org
+#             : DJ Lucas - dj at linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+# Notes       : With code based on Matthias Benkmann's simpleinit-msb
+#               http://winterdrache.de/linux/newboot/index.html
+#
+#               The file should be located in /lib/lsb
+#
+########################################################################
+
+# Set any needed environment variables e.g. HEADLESS
+[ -r /etc/sysconfig/rc.site ]  && . /etc/sysconfig/rc.site
+
+## Environmental setup
+# Setup default values for environment
+umask 022
+export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+
+## Screen Dimensions
+# Find current screen size
+if [ -z "${COLUMNS}" ]; then
+   COLUMNS=$(stty size)
+   COLUMNS=${COLUMNS##* }
+fi
+
+# When using remote connections, such as a serial port, stty size returns 0
+if [ "${COLUMNS}" = "0" ]; then
+   COLUMNS=80
+fi
+
+## Measurements for positioning result messages
+COL=$((${COLUMNS} - 8))
+WCOL=$((${COL} - 2))
+
+## Set Cursor Position Commands, used via echo
+SET_COL="\\033[${COL}G"      # at the $COL char
+SET_WCOL="\\033[${WCOL}G"    # at the $WCOL char
+CURS_UP="\\033[1A\\033[0G"   # Up one line, at the 0'th char
+
+## Set color commands, used via echo
+# Please consult `man console_codes for more information
+# under the "ECMA-48 Set Graphics Rendition" section
+#
+# Warning: when switching from a 8bit to a 9bit font,
+# the linux console will reinterpret the bold (1;) to
+# the top 256 glyphs of the 9bit font.  This does
+# not affect framebuffer consoles
+
+NORMAL="\\033[0;39m"         # Standard console grey
+SUCCESS="\\033[1;32m"        # Success is green
+WARNING="\\033[1;33m"        # Warnings are yellow
+FAILURE="\\033[1;31m"        # Failures are red
+INFO="\\033[1;36m"           # Information is light cyan
+BRACKET="\\033[1;34m"        # Brackets are blue
+
+BOOTLOG=/run/var/bootlog
+KILLDELAY=3
+
+
+
+################################################################################
+# start_daemon()                                                               #
+# Usage: start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args...]      #
+#                                                                              #
+# Purpose: This runs the specified program as a daemon                         #
+#                                                                              #
+# Inputs: -f: (force) run the program even if it is already running.           #
+#         -n nicelevel: specify a nice level. See 'man nice(1)'.               #
+#         -p pidfile: use the specified file to determine PIDs.                #
+#         pathname: the complete path to the specified program                 #
+#         args: additional arguments passed to the program (pathname)          #
+#                                                                              #
+# Return values (as defined by LSB exit codes):                                #
+#       0 - program is running or service is OK                                #
+#       1 - generic or unspecified error                                       #
+#       2 - invalid or excessive argument(s)                                   #
+#       5 - program is not installed                                           #
+################################################################################
+start_daemon()
+{
+    local force=""
+    local nice="0"
+    local pidfile=""
+    local pidlist=""
+    local retval=""
+
+    # Process arguments
+    while true
+    do
+        case "${1}" in
+
+            -f)
+                force="1"
+                shift 1
+                ;;
+
+            -n)
+                nice="${2}"
+                shift 2
+                ;;
+
+            -p)
+                pidfile="${2}"
+                shift 2
+                ;;
+
+            -*)
+                return 2
+                ;;
+
+            *)
+                program="${1}"
+                break
+                ;;
+        esac
+    done
+
+    # Check for a valid program
+    if [ ! -e "${program}" ]; then return 5; fi
+
+    # Execute
+    if [ -z "${force}" ]; then
+        if [ -z "${pidfile}" ]; then
+            # Determine the pid by discovery
+            pidlist=`pidofproc "${1}"`
+            retval="${?}"
+        else
+            # The PID file contains the needed PIDs
+            # Note that by LSB requirement, the path must be given to pidofproc,
+            # however, it is not used by the current implementation or standard.
+            pidlist=`pidofproc -p "${pidfile}" "${1}"`
+            retval="${?}"
+        fi
+
+        # Return a value ONLY 
+        # It is the init script's (or distribution's functions) responsibilty
+        # to log messages!
+        case "${retval}" in
+
+            0)
+                # Program is already running correctly, this is a 
+                # succesful start.
+                return 0
+                ;;
+
+            1)
+                # Program is not running, but an invalid pid file exists
+                # remove the pid file and continue
+                rm -f "${pidfile}"
+                ;;
+
+            3)
+                # Program is not running and no pidfile exists
+                # do nothing here, let start_deamon continue.
+                ;;
+
+            *)
+                # Others as returned by status values shall not be interpreted
+                # and returned as an unspecified error.
+                return 1
+                ;;
+        esac
+    fi
+
+    # Do the start!
+
+    nice -n "${nice}" "${@}"
+}
+
+################################################################################
+# killproc()                                                                   #
+# Usage: killproc [-p pidfile] pathname [signal]                               #
+#                                                                              #
+# Purpose: Send control signals to running processes                           #
+#                                                                              #
+# Inputs: -p pidfile, uses the specified pidfile                               #
+#         pathname, pathname to the specified program                          #
+#         signal, send this signal to pathname                                 #
+#                                                                              #
+# Return values (as defined by LSB exit codes):                                #
+#       0 - program (pathname) has stopped/is already stopped or a             #
+#           running program has been sent specified signal and stopped         #
+#           successfully                                                       #
+#       1 - generic or unspecified error                                       #
+#       2 - invalid or excessive argument(s)                                   #
+#       5 - program is not installed                                           #
+#       7 - program is not running and a signal was supplied                   #
+################################################################################
+killproc()
+{
+    local pidfile
+    local program
+    local prefix
+    local progname
+    local signal="-TERM"
+    local fallback="-KILL"
+    local nosig
+    local pidlist
+    local retval
+    local pid
+    local delay="30"
+    local piddead
+    local dtime
+
+    # Process arguments
+    while true; do
+        case "${1}" in
+            -p)
+                pidfile="${2}"
+                shift 2
+                ;;
+ 
+             *)
+                 program="${1}"
+                 if [ -n "${2}" ]; then
+                     signal="${2}"
+                     fallback=""
+                 else
+                     nosig=1
+                 fi
+
+                 # Error on additional arguments
+                 if [ -n "${3}" ]; then
+                     return 2
+                 else 
+                     break
+                 fi                 
+                 ;;
+        esac
+    done
+
+    # Check for a valid program
+    if [ ! -e "${program}" ]; then return 5; fi
+
+    # Check for a valid signal
+    check_signal "${signal}"
+    if [ "${?}" -ne "0" ]; then return 2; fi
+
+    # Get a list of pids
+    if [ -z "${pidfile}" ]; then
+        # determine the pid by discovery
+        pidlist=`pidofproc "${1}"`
+        retval="${?}"
+    else
+        # The PID file contains the needed PIDs
+        # Note that by LSB requirement, the path must be given to pidofproc,
+        # however, it is not used by the current implementation or standard.
+        pidlist=`pidofproc -p "${pidfile}" "${1}"`
+        retval="${?}"
+    fi
+
+    # Return a value ONLY
+    # It is the init script's (or distribution's functions) responsibilty
+    # to log messages!
+    case "${retval}" in
+
+        0)
+            # Program is running correctly
+            # Do nothing here, let killproc continue.
+            ;;
+
+        1)
+            # Program is not running, but an invalid pid file exists
+            # Remove the pid file.
+            rm -f "${pidfile}"
+
+            # This is only a success if no signal was passed.
+            if [ -n "${nosig}" ]; then
+                return 0
+            else
+                return 7
+            fi
+            ;;
+
+        3)
+            # Program is not running and no pidfile exists
+            # This is only a success if no signal was passed.
+            if [ -n "${nosig}" ]; then
+                return 0
+            else
+                return 7
+            fi
+            ;;
+
+        *)
+            # Others as returned by status values shall not be interpreted
+            # and returned as an unspecified error.
+            return 1
+            ;;
+    esac
+
+    # Perform different actions for exit signals and control signals
+    check_sig_type "${signal}"
+
+    if [ "${?}" -eq "0" ]; then # Signal is used to terminate the program
+
+        # Account for empty pidlist (pid file still exists and no 
+        # signal was given)
+        if [ "${pidlist}" != "" ]; then
+
+            # Kill the list of pids
+            for pid in ${pidlist}; do
+
+                kill -0 "${pid}" 2> /dev/null
+
+                if [ "${?}" -ne "0" ]; then
+                    # Process is dead, continue to next and assume all is well
+                    continue
+                else
+                    kill "${signal}" "${pid}" 2> /dev/null
+
+                    # Wait up to ${delay}/10 seconds to for "${pid}" to 
+                    # terminate in 10ths of a second
+
+                    while [ "${delay}" -ne "0" ]; do
+                        kill -0 "${pid}" 2> /dev/null || piddead="1"
+                        if [ "${piddead}" = "1" ]; then break; fi
+                        sleep 0.1
+                        delay="$(( ${delay} - 1 ))"
+                    done
+
+                    # If a fallback is set, and program is still running, then
+                    # use the fallback
+                    if [ -n "${fallback}" -a "${piddead}" != "1" ]; then
+                        kill "${fallback}" "${pid}" 2> /dev/null
+                        sleep 1
+                        # Check again, and fail if still running
+                        kill -0 "${pid}" 2> /dev/null && return 1
+                    else
+                        # just check one last time and if still alive, fail
+                        sleep 1
+                        kill -0 "${pid}" 2> /dev/null && return 1
+                    fi
+                fi
+            done
+        fi
+
+        # Check for and remove stale PID files.
+        if [ -z "${pidfile}" ]; then
+            # Find the basename of $program
+            prefix=`echo "${program}" | sed 's/[^/]*$//'`
+            progname=`echo "${program}" | sed "s@${prefix}@@"`
+
+            if [ -e "/var/run/${progname}.pid" ]; then
+                rm -f "/var/run/${progname}.pid" 2> /dev/null
+            fi
+        else
+            if [ -e "${pidfile}" ]; then rm -f "${pidfile}" 2> /dev/null; fi
+        fi
+
+    # For signals that do not expect a program to exit, simply
+    # let kill do it's job, and evaluate kills return for value
+
+    else # check_sig_type - signal is not used to terminate program
+        for pid in ${pidlist}; do
+            kill "${signal}" "${pid}"
+            if [ "${?}" -ne "0" ]; then return 1; fi
+        done
+    fi
+}
+
+################################################################################
+# pidofproc()                                                                  #
+# Usage: pidofproc [-p pidfile] pathname                                       #
+#                                                                              #
+# Purpose: This function returns one or more pid(s) for a particular daemon    #
+#                                                                              #
+# Inputs: -p pidfile, use the specified pidfile instead of pidof               #
+#         pathname, path to the specified program                              #
+#                                                                              #
+# Return values (as defined by LSB status codes):                              #
+#       0 - Success (PIDs to stdout)                                           #
+#       1 - Program is dead, PID file still exists (remaining PIDs output)     #
+#       3 - Program is not running (no output)                                 #
+################################################################################
+pidofproc()
+{
+    local pidfile
+    local program
+    local prefix
+    local progname
+    local pidlist
+    local lpids
+    local exitstatus="0"
+
+    # Process arguments
+    while true; do
+        case "${1}" in
+
+            -p)
+                pidfile="${2}"
+                shift 2
+                ;;
+
+            *)
+                program="${1}"
+                if [ -n "${2}" ]; then
+                    # Too many arguments
+                    # Since this is status, return unknown
+                    return 4
+                else
+                    break
+                fi
+                ;;
+        esac
+    done
+
+    # If a PID file is not specified, try and find one.
+    if [ -z "${pidfile}" ]; then
+        # Get the program's basename
+        prefix=`echo "${program}" | sed 's/[^/]*$//'`
+        progname=`echo "${program}" | sed "s@${prefix}@@"`
+
+        # If a PID file exists with that name, assume that is it.
+        if [ -e "/var/run/${progname}.pid" ]; then
+            pidfile="/var/run/${progname}.pid"
+        fi
+    fi
+
+    # If a PID file is set and exists, use it.
+    if [ -n "${pidfile}" -a -e "${pidfile}" ]; then
+
+        # Use the value in the first line of the pidfile
+        pidlist=`/bin/head -n1 "${pidfile}"`
+        # This can optionally be written as 'sed 1q' to repalce 'head -n1'
+        # should LFS move /bin/head to /usr/bin/head
+    else
+        # Use pidof
+        pidlist=`pidof "${program}"`
+    fi
+
+    # Figure out if all listed PIDs are running.
+    for pid in ${pidlist}; do
+        kill -0 ${pid} 2> /dev/null
+
+        if [ "${?}" -eq "0" ]; then
+            lpids="${pids}${pid} "
+        else
+            exitstatus="1"
+        fi
+    done
+
+    if [ -z "${lpids}" -a ! -f "${pidfile}" ]; then
+        return 3
+    else
+        echo "${lpids}"
+        return "${exitstatus}"
+    fi
+}
+
+################################################################################
+# timespec()                                                                   #
+#                                                                              #
+# Purpose: An internal utility function to format a timestamp                  #
+#          a boot log file.  Sets the STAMP variable.                          #
+#                                                                              #
+# Return value: Not used                                                       #
+################################################################################
+timespec()
+{
+   STAMP="$(echo `date +"%b %d %T %:z"` `hostname`) "
+   return 0
+}
+
+################################################################################
+# log_success_msg()                                                            #
+# Usage: log_success_msg ["message"]                                           #
+#                                                                              #
+# Purpose: Print a successful status message to the screen and                 #
+#          a boot log file.                                                    #
+#                                                                              #
+# Inputs: $@ - Message                                                         #
+#                                                                              #
+# Return values: Not used                                                      #
+################################################################################
+log_success_msg()
+{
+    echo -n -e "${@}"
+    echo -e "${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
+
+    timespec
+    echo -e "${STAMP} ${@} OK" >> ${BOOTLOG}
+    return 0
+}
+
+log_success_msg2()
+{
+    echo -n -e "${@}"
+    echo -e "${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
+
+    echo " OK" >> ${BOOTLOG}
+    return 0
+}
+
+################################################################################
+# log_failure_msg()                                                            #
+# Usage: log_failure_msg ["message"]                                           #
+#                                                                              #
+# Purpose: Print a failure status message to the screen and                    #
+#          a boot log file.                                                    #
+#                                                                              #
+# Inputs: $@ - Message                                                         #
+#                                                                              #
+# Return values: Not used                                                      #
+################################################################################
+log_failure_msg()
+{
+    echo -n -e "${@}"
+    echo -e "${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+
+    timespec
+    echo -e "${STAMP} ${@} FAIL" >> ${BOOTLOG}
+    return 0
+}
+
+log_failure_msg2()
+{
+    echo -n -e "${@}"
+    echo -e "${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+
+    echo "FAIL" >> ${BOOTLOG}
+    return 0
+}
+
+################################################################################
+# log_warning_msg()                                                            #
+# Usage: log_warning_msg ["message"]                                           #
+#                                                                              #
+# Purpose: Print a warning status message to the screen and                    #
+#          a boot log file.                                                    #
+#                                                                              #
+# Return values: Not used                                                      #
+################################################################################
+log_warning_msg()
+{
+    echo -n -e "${@}"
+    echo -e "${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
+
+    timespec
+    echo -e "${STAMP} ${@} WARN" >> ${BOOTLOG}
+    return 0
+}
+
+################################################################################
+# log_info_msg()                                                               #
+# Usage: log_info_msg message                                                  #
+#                                                                              #
+# Purpose: Print an information message to the screen and                      #
+#          a boot log file.  Does not print a trailing newline character.      #
+#                                                                              #
+# Return values: Not used                                                      #
+################################################################################
+log_info_msg()
+{
+    echo -n -e "${@}"
+
+    timespec
+    echo -n -e "${STAMP} ${@}" >> ${BOOTLOG}
+    return 0
+}
+
+log_info_msg2()
+{
+    echo -n -e "${@}"
+
+    echo -n -e "${@}" >> ${BOOTLOG}
+    return 0
+}
+
+################################################################################
+# evaluate_retval()                                                            #
+# Usage: Evaluate a return value and print success or failyure as appropriate  #
+#                                                                              #
+# Purpose: Convenience function to terminate an info message                   #
+#                                                                              #
+# Return values: Not used                                                      #
+################################################################################
+evaluate_retval()
+{
+   local error_value="${?}"
+
+   if [ ${error_value} = 0 ]; then
+      log_success_msg2
+   else
+      log_failure_msg2
+   fi
+}
+
+################################################################################
+# check_signal()                                                               #
+# Usage: check_signal [ -{signal} | {signal} ]                                 #
+#                                                                              #
+# Purpose: Check for a valid signal.  This is not defined by any LSB draft,    #
+#          however, it is required to check the signals to determine if the    #
+#          signals chosen are invalid arguments to the other functions.        #
+#                                                                              #
+# Inputs: Accepts a single string value in the form or -{signal} or {signal}   #
+#                                                                              #
+# Return values:                                                               #
+#       0 - Success (signal is valid                                           #
+#       1 - Signal is not valid                                                #
+################################################################################
+check_signal()
+{
+    local valsig
+
+    # Add error handling for invalid signals
+    valsig="-ALRM -HUP -INT -KILL -PIPE -POLL -PROF -TERM -USR1 -USR2"
+    valsig="${valsig} -VTALRM -STKFLT -PWR -WINCH -CHLD -URG -TSTP -TTIN"
+    valsig="${valsig} -TTOU -STOP -CONT -ABRT -FPE -ILL -QUIT -SEGV -TRAP"
+    valsig="${valsig} -SYS -EMT -BUS -XCPU -XFSZ -0 -1 -2 -3 -4 -5 -6 -8 -9"
+    valsig="${valsig} -11 -13 -14 -15"
+
+    echo "${valsig}" | grep -- " ${1} " > /dev/null
+
+    if [ "${?}" -eq "0" ]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+################################################################################
+# check_sig_type()                                                             #
+# Usage: check_signal [ -{signal} | {signal} ]                                 #
+#                                                                              #
+# Purpose: Check if signal is a program termination signal or a control signal #
+#          This is not defined by any LSB draft, however, it is required to    #
+#          check the signals to determine if they are intended to end a        #
+#          program or simply to control it.                                    #
+#                                                                              #
+# Inputs: Accepts a single string value in the form or -{signal} or {signal}   #
+#                                                                              #
+# Return values:                                                               #
+#       0 - Signal is used for program termination                             #
+#       1 - Signal is used for program control                                 #
+################################################################################
+check_sig_type()
+{
+    local valsig
+
+    # The list of termination signals (limited to generally used items)
+    valsig="-ALRM -INT -KILL -TERM -PWR -STOP -ABRT -QUIT -2 -3 -6 -9 -14 -15"
+
+    echo "${valsig}" | grep -- " ${1} " > /dev/null
+
+    if [ "${?}" -eq "0" ]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+################################################################################
+# wait_for_user()                                                              #
+#                                                                              #
+# Purpose: Wait for the user to respond if not a headless system               #
+#                                                                              #
+################################################################################
+wait_for_user()
+{
+   # Wait for the user by default
+   [ "${HEADLESS=0}" = "0" ] && read ENTER
+   return 0
+}
+
+# End /lib/lsb/init-functions

Added: trunk/lfs/bootscripts/lfs/lib/services/ipv4-static
===================================================================
--- trunk/lfs/bootscripts/lfs/lib/services/ipv4-static	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/lib/services/ipv4-static	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,89 @@
+#!/bin/sh
+########################################################################
+# Begin /lib/services/ipv4-static
+#
+# Description : IPV4 Static Boot Script
+#
+# Authors     : Nathan Coulson - nathan at linuxfromscratch.org
+#               Kevin P. Fleming - kpfleming at linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+########################################################################
+
+. /lib/lsb/init-functions
+. ${IFCONFIG}
+
+if [ -z "${IP}" ]; then
+   log_failure_msg "\nIP variable missing from ${IFCONFIG}, cannot continue."
+   exit 1
+fi
+
+if [ -z "${PREFIX}" -a -z "${PEER}" ]; then
+   log_warning_msg "\nPREFIX variable missing from ${IFCONFIG}, assuming 24."
+   PREFIX=24
+   args="${args} ${IP}/${PREFIX}"
+
+elif [ -n "${PREFIX}" -a -n "${PEER}" ]; then
+   log_failure_msg "\nPREFIX and PEER both specified in ${IFCONFIG}, cannot continue."
+   exit 1
+
+elif [ -n "${PREFIX}" ]; then
+   args="${args} ${IP}/${PREFIX}"
+
+elif [ -n "${PEER}" ]; then
+   args="${args} ${IP} peer ${PEER}"
+fi
+
+if [ -n "${BROADCAST}" ]; then
+   args="${args} broadcast ${BROADCAST}"
+fi
+
+case "${2}" in
+   up)
+      if [ "$(ip addr show ${1} | grep ${IP})" == "" ]; then
+         log_info_msg2 "\n" # Terminate the previous message
+         log_info_msg "Adding IPv4 address ${IP} to the ${1} interface..."
+         ip addr add ${args} dev ${1}
+         evaluate_retval
+
+         if [ -n "${GATEWAY}" ]; then
+            if ip route | grep -q default; then
+               log_warning_msg "\nGateway already setup; skipping."
+            else
+               log_info_msg "Setting up default gateway..."
+               ip route add default via ${GATEWAY} dev ${1}
+               evaluate_retval
+             fi
+         fi
+      else
+         msg="Cannot add IPv4 address ${IP} to ${1}.  Already present."
+         log_warning_msg "$msg"
+      fi
+   ;;
+
+   down)
+      if [ "$(ip addr show ${1} | grep ${IP})" != "" ]; then
+         log_info_msg "Removing IPv4 address ${IP} from the ${1} interface..."
+         ip addr del ${args} dev ${1}
+         evaluate_retval
+      fi
+
+      if [ -n "${GATEWAY}" ]; then
+         # Only remove the gateway if ther are no remaining ipv4 addresses
+         if [ "$(ip addr show ${1} | grep 'inet ')" != "" ]; then
+            log_info_msg "Removing default gateway..."
+            ip route del default
+            evaluate_retval
+         fi
+      fi
+   ;;
+
+   *)
+      echo "Usage: ${0} [interface] {up|down}"
+      exit 1
+   ;;
+esac
+
+# End /lib/services/ipv4-static


Property changes on: trunk/lfs/bootscripts/lfs/lib/services/ipv4-static
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/lfs/bootscripts/lfs/lib/services/ipv4-static-route
===================================================================
--- trunk/lfs/bootscripts/lfs/lib/services/ipv4-static-route	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/lib/services/ipv4-static-route	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,92 @@
+#!/bin/sh
+########################################################################
+# Begin /lib/services/ipv4-static-route
+#
+# Description : IPV4 Static Route Script
+#
+# Authors     : Kevin P. Fleming - kpfleming at linuxfromscratch.org
+#               DJ Lucas - dj at linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+########################################################################
+
+. /lib/lsb/init-functions
+. ${IFCONFIG}
+
+case "${TYPE}" in
+   ("" | "network")
+      need_ip=1
+      need_gateway=1
+   ;;
+
+   ("default")
+      need_gateway=1
+      args="${args} default"
+      desc="default"
+   ;;
+
+   ("host")
+      need_ip=1
+   ;;
+
+   ("unreachable")
+      need_ip=1
+      args="${args} unreachable"
+      desc="unreachable "
+   ;;
+
+   (*)
+      log_failure_msg "Unknown route type (${TYPE}) in ${IFCONFIG}, cannot continue."
+      exit 1
+   ;;
+esac
+
+if [ -n "${need_ip}" ]; then
+   if [ -z "${IP}" ]; then
+      log_failure_msg "IP variable missing from ${IFCONFIG}, cannot continue."
+      exit 1
+   fi
+
+   if [ -z "${PREFIX}" ]; then
+      log_failure_msg "PREFIX variable missing from ${IFCONFIG}, cannot continue." 
+      exit 1
+   fi
+   
+   args="${args} ${IP}/${PREFIX}"
+   desc="${desc}${IP}/${PREFIX}"
+fi
+
+if [ -n "${need_gateway}" ]; then
+   if [ -z "${GATEWAY}" ]; then
+      log_failure_msg "GATEWAY variable missing from ${IFCONFIG}, cannot continue."
+      exit 1
+   fi
+   args="${args} via ${GATEWAY}"
+fi
+
+if [ -n "${SOURCE}" ]; then
+        args="${args} src ${SOURCE}"
+fi
+
+case "${2}" in
+   up)
+      log_info_msg "Adding '${desc}' route to the ${1} interface..."
+      ip route add ${args} dev ${1}
+      evaluate_retval
+   ;;
+   
+   down)
+      log_info_msg "Removing '${desc}' route from the ${1} interface..."
+      ip route del ${args} dev ${1}
+      evaluate_retval
+   ;;
+   
+   *)
+      echo "Usage: ${0} [interface] {up|down}"
+      exit 1
+   ;;
+esac
+
+# End /lib/services/ipv4-static-route


Property changes on: trunk/lfs/bootscripts/lfs/lib/services/ipv4-static-route
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/lfs/bootscripts/lfs/sbin/ifdown
===================================================================
--- trunk/lfs/bootscripts/lfs/sbin/ifdown	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/sbin/ifdown	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,98 @@
+#!/bin/bash 
+########################################################################
+# Begin /sbin/ifdown
+#
+# Description : Interface Down
+#
+# Authors     : Nathan Coulson - nathan at linuxfromscratch.org
+#               Kevin P. Fleming - kpfleming at linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+# Notes       : the IFCONFIG variable is passed to the scripts found
+#               in the /lib/services directory, to indicate what file the
+#               service should source to get interface specifications.
+#
+########################################################################
+
+RELEASE="7.0"
+
+USAGE="Usage: $0 [ -hV ] [--help] [--version] interface"
+VERSTR="LFS ifdown, version ${RELEASE}"
+
+while [ $# -gt 0 ]; do
+   case "$1" in
+      --help | -h)     help="y"; break ;;
+
+      --version | -V)  echo "${VERSTR}"; exit 0 ;;
+
+      -*)              echo "ifup: ${1}: invalid option" >&2
+                       echo "${USAGE}" >& 2
+                       exit 2 ;;
+                    
+      *)               break ;;
+   esac
+done
+
+if [ -n "$help" ]; then
+   echo "${VERSTR}"
+   echo "${USAGE}"
+   echo
+   cat << HERE_EOF
+ifdown is used to bring down a network interface.  The interface
+parameter, e.g. eth0 or eth0:2, must match the trailing part of the
+interface specifications file, e.g. /etc/sysconfig/ifconfig.eth0:2.
+
+HERE_EOF
+   exit 0
+fi
+
+file=/etc/sysconfig/ifconfig.${1}
+
+# Skip backup files
+[ "${file}" = "${file%""~""}" ] || exit 0
+
+. /lib/lsb/init-functions 
+
+if [ ! -r "${file}" ]; then
+   log_warning_msg "${file} is missing or cannot be accessed."
+   exit 1
+fi
+
+. ${file}
+
+if [ "$IFACE" = "" ]; then
+   log_failure_msg "${file} does not define an interface [IFACE]."
+   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
+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
+
+link_status=`ip link show ${IFACE} 2>/dev/null`
+
+if [ -n "${link_status}" ]; then
+   if [ "$(echo "${link_status}" | grep UP)" != "" ]; then
+      if [ "$(ip addr show ${IFACE} | grep 'inet ')" != ""  ]; then
+         log_info_msg "Bringing down the ${IFACE} interface..."
+         ip link set ${IFACE} down
+         evaluate_retval
+      fi
+   fi
+fi
+
+# End /sbin/ifdown


Property changes on: trunk/lfs/bootscripts/lfs/sbin/ifdown
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/lfs/bootscripts/lfs/sbin/ifup
===================================================================
--- trunk/lfs/bootscripts/lfs/sbin/ifup	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/sbin/ifup	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,110 @@
+#!/bin/sh
+########################################################################
+# Begin /sbin/ifup
+#
+# Description : Interface Up
+#
+# Authors     : Nathan Coulson - nathan at linuxfromscratch.org
+#               Kevin P. Fleming - kpfleming at linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+# Notes       : The IFCONFIG variable is passed to the SERVICE script
+#               in the /lib/services directory, to indicate what file the
+#               service should source to get interface specifications.
+#
+########################################################################
+
+RELEASE="7.0"
+
+USAGE="Usage: $0 [ -hV ] [--help] [--version] interface"
+VERSTR="LFS ifup, version ${RELEASE}"
+
+while [ $# -gt 0 ]; do
+   case "$1" in
+      --help | -h)     help="y"; break ;;
+
+      --version | -V)  echo "${VERSTR}"; exit 0 ;;
+   
+      -*)              echo "ifup: ${1}: invalid option" >&2
+                       echo "${USAGE}" >& 2
+                       exit 2 ;;
+                       
+      *)               break ;;
+   esac
+done
+
+if [ -n "$help" ]; then
+   echo "${VERSTR}"
+   echo "${USAGE}"
+   echo
+   cat << HERE_EOF
+ifup is used to bring up a network interface.  The interface
+parameter, e.g. eth0 or eth0:2, must match the trailing part of the
+interface specifications file, e.g. /etc/sysconfig/ifconfig.eth0:2.
+
+HERE_EOF
+   exit 0
+fi
+
+file=/etc/sysconfig/ifconfig.${1}
+
+# Skip backup files
+[ "${file}" = "${file%""~""}" ] || exit 0
+
+. /lib/lsb/init-functions
+
+log_info_msg "Bringing up the ${1} interface... "
+
+if [ ! -r "${file}" ]; then
+   log_warning_msg "\n${file} is missing or cannot be accessed." 
+   exit 1
+fi
+
+. $file
+
+if [ "$IFACE" = "" ]; then
+   log_failure_msg "\n${file} does not define an interface [IFACE]."
+   exit 1
+fi
+
+# Do not process this service if started by boot, and ONBOOT
+# is not set to yes
+if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
+   log_info_msg2 "skipped\n"
+   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
+
+      #  Bring up the interface
+      if ip link show ${IFACE} > /dev/null 2>&1; then
+         link_status=`ip link show ${IFACE}`
+
+         if [ -n "${link_status}" ]; then
+            if ! echo "${link_status}" | grep -q UP; then
+               ip link set ${IFACE} up
+            fi
+         fi
+
+      else
+         log_warning_msg "\nInterface ${IFACE} doesn't exist."
+      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
+fi
+
+# End /sbin/ifup


Property changes on: trunk/lfs/bootscripts/lfs/sbin/ifup
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/lfs/bootscripts/lfs/sbin/ifup.8
===================================================================
--- trunk/lfs/bootscripts/lfs/sbin/ifup.8	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/sbin/ifup.8	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,108 @@
+ifup(8)                                                   ifup(8)
+
+NAME
+       ifup - bring a network interface up
+       ifdown - take a network interface down
+
+SYNOPSIS
+       ifup  IFACE
+       ifup -h|--help
+       ifup -V|--version
+
+       ifdown IFACE
+       ifdown -h|--help
+       ifdown -V|--version
+
+DESCRIPTION
+       The  ifup  and  ifdown  commands  may be used to configure 
+       (or, respectively, deconfigure) a network interface based 
+       on interface  definitions in the file 
+       /etc/sysconfig/ifconfig.IFACE.
+
+OPTIONS
+       A summary of options is included below.
+
+       -h, --help
+              Show summary of options.
+
+       -V, --version
+              Show version information.
+
+EXAMPLE
+       ifup eth0
+              Bring up the interface defined in the file 
+              /etc/sysconfig/ifconfig.eth0
+
+       ifdown eth0:2
+              Bring down the interface defined in the file
+              /etc/sysconfig/ifconfig.eth0:2
+
+NOTES
+       The program does not configure network interfaces direct-
+       ly.  It runs scripts defined by the SERVICE variable in 
+       the network configuration file.
+
+       The configuration files must have the following environ-
+       ment variables set:
+
+       IFACE   - The interface to configure, e.g. eth0.  It must 
+                 be available in /sys/class/net.
+
+       SERVICE - The service script to run to bring up the inter-
+                 face.  Standard services are ipv4-static and 
+                 ipv4-static-route.  Other services such as dhcp
+                 may be installed.
+
+       ONBOOT  - If set to 'yes', the specified interface is 
+                 configured by the netowrk boot script.
+
+       Other paramters that are service specific include:
+
+       ipv4-static
+
+         IP        - The IP address of the interface, 
+                     e.g. 192.168.1.2.
+
+         PREFIX    - The number of bits that specify the network
+                     number of the interface, e.g., 24.
+       
+         GATEWAY   - The default IP address to use for routing 
+                     if the destination IP address is not in a 
+                     static route or on a local network, e.g., 
+                     192.168.1.1.  For secondary IP addresses on
+                     an interface, this parameter should not be 
+                     specified.
+
+         BROADCAST - The brodcast address for this interface, 
+                     e.g 192.168.1.255.
+
+       ipv4-static-route
+
+         TYPE    -  The type of route, typically 'default', 
+                    'network', 'or host'.
+
+         IP      -  The IP address for a network or host, if thei
+                    TYPE is not 'default'.
+
+         PREFIX  -  The prefix for the associated IP address.
+
+         GATEWAY -  The IP address for a network route.
+
+         SOURCE  -  The source IP address to prefer when sending 
+                    to the destinations covered by the specified
+                    route. (optional)
+
+FILES
+       /etc/sysconfig/ifconfig.*
+              definitions of network interfaces 
+
+AUTHORS
+       The  ifup/ifdown suite was written by Nathan Coulson
+       <nathan at linuxfromscratch.org> and Kevin P. Fleming 
+       <kpfleming at linuxfromscratch.org>
+       and updated by Bruce Dubbs <bdubbs at linuxfromscratch>.
+
+SEE ALSO
+       ip(8).
+
+IFUP/IFDOWN                   18 Sep 2011                 ifup(8)

Modified: trunk/lfs/bootscripts/lfs/sysconfig/createfiles
===================================================================
--- trunk/lfs/bootscripts/lfs/sysconfig/createfiles	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/sysconfig/createfiles	2011-09-19 16:22:31 UTC (rev 1418)
@@ -8,21 +8,24 @@
 # Version     : 00.00
 #
 # Notes       : The syntax of this file is as follows:
-#     if type is equal to "file" or "dir"
-#        <filename> <type> <permissions> <user> <group>
-#     if type is equal to "dev"
-#        <filename> <type> <permissions> <user> <group> <devtype> <major> <minor>
+# 		if type is equal to "file" or "dir"
+#  		<filename> <type> <permissions> <user> <group>
+# 		if type is equal to "dev"
+#  		<filename> <type> <permissions> <user> <group> <devtype> 
+#             <major> <minor>
 #
-#     <filename> is the name of the file which is to be created
-#     <type> is either file, dir, or dev.
-#           file creates a new file
-#           dir creates a new directory
-#           dev creates a new device
-#     <devtype> is either block, char or pipe
-#           block creates a block device
-#           char creates a character deivce
-#           pipe creates a pipe, this will ignore the <major> and <minor> fields
-#     <major> and <minor> are the major and minor numbers used for the device.
+# 		<filename> is the name of the file which is to be created
+# 		<type> is either file, dir, or dev.
+#   			file creates a new file
+#   			dir creates a new directory
+#   			dev creates a new device
+# 		<devtype> is either block, char or pipe
+#   			block creates a block device
+#   			char creates a character deivce
+#   			pipe creates a pipe, this will ignore the <major> and 
+#           <minor> fields
+# 		<major> and <minor> are the major and minor numbers used for 
+#     the device.
 ########################################################################
 
 # End /etc/sysconfig/createfiles

Modified: trunk/lfs/bootscripts/lfs/sysconfig/rc
===================================================================
--- trunk/lfs/bootscripts/lfs/sysconfig/rc	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/bootscripts/lfs/sysconfig/rc	2011-09-19 16:22:31 UTC (rev 1418)
@@ -7,7 +7,7 @@
 #
 # Version     : 00.00
 #
-# Notes       :
+# Notes       :  Not used by LFS, but present for BLFS compatibility
 #
 ########################################################################
 

Added: trunk/lfs/bootscripts/lfs/sysconfig/rc.site
===================================================================
--- trunk/lfs/bootscripts/lfs/sysconfig/rc.site	                        (rev 0)
+++ trunk/lfs/bootscripts/lfs/sysconfig/rc.site	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,61 @@
+# rc.site
+# Optional parameters for boot scripts.
+
+# Distro Information
+DISTRO="Linux From Scratch" # The distro name
+DISTRO_CONTACT="lfs-dev at linuxfromscratch.org" # Bug report address
+DISTRO_MINI="LFS" # Short name used in filenames for distro config
+
+# Define custom colors used in messages printed to the screen
+# These values, if specified here, override the defaults
+#BRACKET="\\033[1;34m" # Blue
+#FAILURE="\\033[1;31m" # Red
+#INFO="\\033[1;36m"    # Cyan
+#NORMAL="\\033[0;39m"  # Grey
+#SUCCESS="\\033[1;32m" # Green
+#WARNING="\\033[1;33m" # Yellow
+
+# Interactive startup
+#IPROMPT="yes" # Whether to display the interactive boot promp
+itime="10"    # The ammount of time (in seconds) to display the prompt
+
+# The total length of the distro welcome string, without escape codes
+wlen=$(echo "Welcome to ${DISTRO}" | wc -c )
+welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"
+
+# The total length of the interactive string, without escape codes
+ilen=$(echo "Press 'I' to enter interactive startup" | wc -c )
+i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"
+
+# Set scripts to skip the file system check on reboot
+#FASTBOOT=yes
+
+# Skip reading from the console
+#HEADLESS=yes
+
+# Skip cleaning /tmp
+#SKIPTMPCLEAN=yes
+
+# For setclock
+#UTC=1
+#CLOCKPARAMS=
+
+# For consolelog
+#LOGLEVEL=5
+
+# For network
+#HOSTNAME=mylfs
+
+# Delay between TERM and KILL signals at shutdown
+#KILLDELAY=3
+
+# Optional sysklogd parameters
+#SYSKLOGD_PARMS="-m 0"
+
+# Console parameters
+#UNICODE=1
+#KEYMAP="de-latin1"
+#KEYMAP_CORRECTIONS="euro2"
+#FONT="lat0-16 -m 8859-15"
+#LEGACY_CHARSET=
+

Modified: trunk/lfs/chapter01/changelog.xml
===================================================================
--- trunk/lfs/chapter01/changelog.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter01/changelog.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -38,6 +38,50 @@
 
 -->
     <listitem>
+      <para>18-09-2011</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Relecture et répercution des changements récents sur
+          les scripts de démarrage.</para>
+          <itemizedlist>
+             <listitem><para>Renommage de /etc/sysconfig/init_params en /etc/sysconfig/rc.site.</para>
+             </listitem>
+             <listitem><para>Déplacement de network services vers /lib/services.</para></listitem>
+             <listitem><para>Déplacement d'init-functions vers /lib/lsb.</para></listitem>
+             <listitem><para>/lib/lsb devient un lien symbolique vers /lib/services.</para></listitem>
+             <listitem><para>Création d'un lien symbolique commode /etc/init.d->/etc/rc.d/init.d
+                       </para></listitem>
+             <listitem><para>Ajout d'une aide et de pages de man à ifup/ifdown.
+                             </para></listitem>
+             <listitem><para>Renvoi de /run/var/bootlog vers /var/log/boot.log 
+             à la fin de la séquence d'amorçage.</para></listitem>
+             <listitem><para>Ajout de la possibilité de retracer pas à pas 
+             les scripts de démarrage au moment de l'amorçage.
+                  </para></listitem>
+             <listitem><para>Possibilité facultative de mettre les variables 
+             d'environnement des fichiers console, network, et clock 
+             du répertoire sysconfig dans rc.site.
+                  </para></listitem>
+             <listitem><para>Ajout d'un paramètre FASTBOOT facultatif pour
+             régler /fastboot lors du redémarrage.
+                  </para></listitem>
+          </itemizedlist>
+        </listitem>
+        <listitem>
+           <para>[bdubbs] - Suppression d'un léger message d'avertissement d'udev 
+           provoqué par le script de démarrage udev_retry.</para>
+        </listitem>
+        <listitem>
+           <para>[bdubbs] - Ajout de SKIPTMPCLEAN comme paramètre facultatif 
+           pour passer le nettoyage de /tmp au moment du démarrage.</para>
+        </listitem>
+        <listitem>
+           <para>[bdubbs] - Ajout d'une page au chapitre 7 documentant rc.site.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>04-09-2011</para>
       <itemizedlist>
         <listitem>

Modified: trunk/lfs/chapter05/binutils-pass2.xml
===================================================================
--- trunk/lfs/chapter05/binutils-pass2.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter05/binutils-pass2.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -53,10 +53,11 @@
 
 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -B/tools/lib/" \
    AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
-   <!-- ../binutils-&binutils-version;/configure - -prefix=/tools \ -->
    ../binutils-&binutils-dir;/configure --prefix=/tools \
    --disable-nls --with-lib-path=/tools/lib</userinput></screen>
 
+<!--   ../binutils-&binutils-version;/configure - -prefix=/tools \ -->
+
     <variablelist>
       <title>Voici la signification des nouvelles options de configure :</title>
 

Modified: trunk/lfs/chapter06/udev.xml
===================================================================
--- trunk/lfs/chapter06/udev.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter06/udev.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -39,8 +39,13 @@
   </sect2>
 
   <sect2 role="installation">
-    <title>Installation de Udev</title>
+    <title>Installation d'Udev</title>
 
+    <para>Éventuellement, supprimez un message d'avertissement inutile affiché
+    dans cette version d'udev lors du démarrage.</para>
+
+<screen><userinput remap="pre">sed -i -e '/deprecated/d' udev/udevadm-trigger.c</userinput></screen>
+
     <para>L'archive tar udev-config contient des fichiers spécifiques à
     LFS-specific utilisés pour configurer Udev. Déballez-la dans le
     répertoire des sources Udev :</para>

Modified: trunk/lfs/chapter07/bootscripts.xml
===================================================================
--- trunk/lfs/chapter07/bootscripts.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter07/bootscripts.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -59,7 +59,8 @@
         ifup, localnet, modules, mountfs, mountkernfs, network, rc, reboot,
         sendsignals, setclock, static, swap, sysctl, sysklogd, template,
         udev et udev_retry</seg>
-        <seg>/etc/rc.d, /etc/sysconfig, /lib/boot</seg>
+        <seg>/etc/rc.d, /etc/init.d (symbolic link), /etc/sysconfig, 
+        /lib/services, /lib/lsb (symbolic link)</seg>
       </seglistitem>
     </segmentedlist>
 

Modified: trunk/lfs/chapter07/chapter07.xml
===================================================================
--- trunk/lfs/chapter07/chapter07.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter07/chapter07.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -22,6 +22,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="setclock.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="console.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="site.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="profile.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/>
 

Modified: trunk/lfs/chapter07/network.xml
===================================================================
--- trunk/lfs/chapter07/network.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter07/network.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -177,7 +177,7 @@
     pour obtenir une adresse IP. Les scripts de démarrage LFS ont un
     format d'affectation IP modulaire. Créer les fichier supplémentaires
     dans le répertoire
-    <filename class="directory">/lib/boot/</filename>
+    <filename class="directory">/lib/services/</filename>
     autorise d'autres méthodes d'affectation d'IP. Ceci est habituellement
     utilisé pour le DHCP (<foreignphrase>Dynamic Host Configuration
     Protocol</foreignphrase>, NdT :protocole de configuration de

Modified: trunk/lfs/chapter07/setclock.xml
===================================================================
--- trunk/lfs/chapter07/setclock.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter07/setclock.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -72,6 +72,6 @@
   <envar>TZ</envar>.</para>
 
   <note><para>Vous pouvez régler soit le paramètre CLOCKPARAMS soit UTC dans
-  le fichier <filename>/etc/sysconfig/init_params</filename>.</para></note>
+  le fichier <filename>/etc/sysconfig/rc.site</filename>.</para></note>
 
 </sect1>

Added: trunk/lfs/chapter07/site.xml
===================================================================
--- trunk/lfs/chapter07/site.xml	                        (rev 0)
+++ trunk/lfs/chapter07/site.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -0,0 +1,36 @@
+<?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">
+  <!ENTITY site               SYSTEM "../appendices/rc.site.script">
+  %general-entities;
+]>
+
+<sect1 id="ch-scripts-site">
+  <?dbhtml filename="site.html"?>
+
+  <title>Le fichier rc.site</title>
+
+  <indexterm zone="ch-scripts-site">
+    <primary sortas="a-rc.site">rc.site</primary>
+  </indexterm>
+
+  <para>Le fichier facultatif <filename>/etc/sysconfig/rc.site</filename> 
+  contient les paramètres réglés automatiquement pour chaque script de démarrage.
+  Il peut aussi régler les valeurs spécifiées dans les fichiers <filename>hostname</filename>,
+  <filename>console</filename> et <filename>clock</filename> du répertoire
+  <filename class='directory'>/etc/sysconfig/</filename>.  Si les variables 
+  associées se trouvent à la fois dans ces fichiers distincts et dans
+  <filename>rc.site</filename>, les valeurs des fichiers spécifiques au script
+  prennent le dessus. </para>
+
+  <para><filename>rc.site</filename> contient aussi des paramètres pour
+  personnaliser d'autres aspects du processus de démarrage. Le réglage de la 
+  variable IPROMPT permettra un lancement sélectif des scripts de démarrage.
+  D'autres options sont décrites dans les commentaires du fichier. La version 
+  par défaut du fichier est comme suit :</para>
+
+  <screen>&site;</screen>
+
+</sect1>
+

Modified: trunk/lfs/chapter07/sysklogd.xml
===================================================================
--- trunk/lfs/chapter07/sysklogd.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter07/sysklogd.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -20,7 +20,7 @@
   <parameter>-m 0</parameter>. Cette option désactive la marque
   périodique que <command>syslogd</command> écrit par défaut dans les fichiers 
   journaux toutes les 20 minutes. Si vous voulez activer cette marque périodique,
-  créez ou éditez <filename>/etc/sysconfig/init_params</filename> et définissez
+  d'horodatage, éditez <filename>/etc/sysconfig/rc.site</filename> et définissez
   la variable SYSKLOGD_PARMS sur la valeur désirée. Par exemple, pour supprimer
   tous les paramètres, réglez la variable à la valeur null :</para>
 

Modified: trunk/lfs/chapter07/usage.xml
===================================================================
--- trunk/lfs/chapter07/usage.xml	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/chapter07/usage.xml	2011-09-19 16:22:31 UTC (rev 1418)
@@ -72,7 +72,7 @@
 
 id:3:initdefault:
 
-si::sysinit:/etc/rc.d/init.d/rc sysinit
+si::sysinit:/etc/rc.d/init.d/rc S
 
 l0:0:wait:/etc/rc.d/init.d/rc 0
 l1:S1:wait:/etc/rc.d/init.d/rc 1
@@ -106,7 +106,7 @@
   est spécifié par la valeur initdefault.</para>
 
   <para>Par commodité, le script <command>rc</command> lit une bibliothèque
-  de fonctions dans <filename class="directory">/lib/boot/functions</filename>.
+  de fonctions dans <filename class="directory">/lib/lsb/init-functions</filename>.
   Cette bibliothèque lit aussi un fichier de configuration facultatif,
   <filename>/etc/sysconfig/init_params</filename>.  Tous les paramètres du
   fichier de configuration du système décrits dans les sections suivantes peuvent

Modified: trunk/lfs/general.ent
===================================================================
--- trunk/lfs/general.ent	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/general.ent	2011-09-19 16:22:31 UTC (rev 1418)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!ENTITY version "SVN-20110904">
-<!ENTITY releasedate "4 septembre 2011">
+<!ENTITY version "SVN-20110918">
+<!ENTITY releasedate "18 septembre 2011">
 <!ENTITY copyrightdate "1999–2011">
 <!ENTITY milestone "7.0">
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->

Modified: trunk/lfs/packages.ent
===================================================================
--- trunk/lfs/packages.ent	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/packages.ent	2011-09-19 16:22:31 UTC (rev 1418)
@@ -297,7 +297,7 @@
 <!ENTITY less-ch6-du "3.5 Mio">
 <!ENTITY less-ch6-sbu "moins de 0.1 SBU">
 
-<!ENTITY lfs-bootscripts-version "20110903">                 <!-- Scripts depend on this format -->
+<!ENTITY lfs-bootscripts-version "20110918">                 <!-- Scripts depend on this format -->
 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE Kio">         <!-- 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 -->

Modified: trunk/lfs/process-scripts.sh
===================================================================
--- trunk/lfs/process-scripts.sh	2011-09-07 18:01:53 UTC (rev 1417)
+++ trunk/lfs/process-scripts.sh	2011-09-19 16:22:31 UTC (rev 1418)
@@ -3,14 +3,14 @@
 # Boot scripts
 for s in bootscripts/lfs/init.d/*                    \
          bootscripts/lfs/sysconfig/*                 \
-         bootscripts/lfs/sysconfig/network-devices/* \
-         bootscripts/lfs/sysconfig/network-devices/services/*
+         bootscripts/lfs/lib/services/* \
+         bootscripts/lfs/sbin/*
 do
   script=$(basename $s)
   
   # Skip directories
   [ $script == 'network-devices' ] && continue
-  [ $script == 'services'        ] && continue
+  #[ $script == 'services'        ] && continue
 
   # Disambiguate duplicate file names
   [ $s == 'bootscripts/lfs/sysconfig/rc'      ] && script='rc-sysinit'; 




More information about the lfs-traducfr mailing list