Index: appendices/scripts.xml
===================================================================
--- appendices/scripts.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ appendices/scripts.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -9,4 +9,5 @@
   <!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"> 
@@ -58,4 +59,9 @@
   </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>
@@ -174,20 +180,20 @@
 
   <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>
Index: bootscripts/ChangeLog
===================================================================
--- bootscripts/ChangeLog	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/ChangeLog	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -1,2 +1,17 @@
+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@linuxfromscratch.org>
    * Major rewrite of all LFS scripts
Index: bootscripts/Makefile
===================================================================
--- bootscripts/Makefile	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/Makefile	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -1,32 +1,36 @@
 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/
@@ -38,46 +42,17 @@
 	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/
-	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
-	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/localnet    ${EXTDIR}/rc.d/rc0.d/S90localnet
-	ln -sf ../init.d/halt        ${EXTDIR}/rc.d/rc0.d/S99halt
-	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc1.d/K80network
-	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc1.d/K90sysklogd
-	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc2.d/K80network
-	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc2.d/K90sysklogd
-	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc3.d/S10sysklogd
-	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc3.d/S20network
-	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc4.d/S10sysklogd
-	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc4.d/S20network
-	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc5.d/S10sysklogd
-	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc5.d/S20network
-	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
-	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/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
+	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/ ;\
@@ -89,46 +64,62 @@
      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}
+	if [ ! -f ${EXTDIR}/sysconfig/rc.site     ]; then \
+     install -m ${CONFMODE} lfs/sysconfig/rc.site     ${EXTDIR}/sysconfig/ ;\
+   fi
 
-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
+links: files 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/
+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
 	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/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
 	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/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/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 
+.PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
 
Index: bootscripts/README
===================================================================
--- bootscripts/README	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/README	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -1,48 +1,43 @@
 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
Index: bootscripts/lfs/init.d/checkfs
===================================================================
--- bootscripts/lfs/init.d/checkfs	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/checkfs	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -7,4 +7,5 @@
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
 #               A. Luebke - luebke@users.sourceforge.net
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -38,36 +39,38 @@
 ### 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
@@ -75,33 +78,31 @@
       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
@@ -109,28 +110,29 @@
 
       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
       ;;
    *)
Index: bootscripts/lfs/init.d/cleanfs
===================================================================
--- bootscripts/lfs/init.d/cleanfs	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/cleanfs	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -27,65 +28,68 @@
 ### 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
@@ -103,8 +107,10 @@
 
       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
       ;;
    *)
Index: bootscripts/lfs/init.d/console
===================================================================
--- bootscripts/lfs/init.d/console	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/console	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -7,4 +7,5 @@
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
 #               Alexander E. Patrakov
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -12,6 +13,4 @@
 #
 ########################################################################
-
-. /lib/boot/functions
 
 ### BEGIN INIT INFO
@@ -29,14 +28,20 @@
 ### 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
+[ -r /etc/sysconfig/console ] && . /etc/sysconfig/console
+
+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
-
-is_true() {
-   [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
-}
 
 failed=0
@@ -44,20 +49,20 @@
 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}"
 
@@ -67,6 +72,4 @@
       # 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 |
@@ -78,10 +81,10 @@
 
       # 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 ||
@@ -90,17 +93,19 @@
       # 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
 
Index: bootscripts/lfs/init.d/consolelog
===================================================================
--- bootscripts/lfs/init.d/consolelog	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/consolelog	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,5 +6,6 @@
 #
 # Authors     : Dan Nicholson - dnicholson@linuxfromscratch.org
-# Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
+#               Gerard Beekmans  - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -28,10 +29,10 @@
 ### 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
@@ -39,12 +40,15 @@
       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
       ;;
@@ -55,11 +59,12 @@
          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
       ;;
Index: bootscripts/lfs/init.d/functions
===================================================================
--- bootscripts/lfs/init.d/functions	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/functions	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -13,10 +13,10 @@
 #               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
Index: bootscripts/lfs/init.d/halt
===================================================================
--- bootscripts/lfs/init.d/halt	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/halt	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
Index: bootscripts/lfs/init.d/localnet
===================================================================
--- bootscripts/lfs/init.d/localnet	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/localnet	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -26,15 +27,15 @@
 ### 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
@@ -42,5 +43,5 @@
 
    stop)
-      boot_mesg "Bringing down the loopback interface..."
+      log_info_msg "Bringing down the loopback interface..."
       ip link set lo down
       evaluate_retval
@@ -64,3 +65,5 @@
 esac
 
+exit 0
+
 # End localnet
Index: bootscripts/lfs/init.d/modules
===================================================================
--- bootscripts/lfs/init.d/modules	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/modules	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Zack Winkles
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -25,8 +26,8 @@
 ### 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
@@ -34,12 +35,12 @@
       # 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
 
@@ -49,12 +50,10 @@
          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}"
@@ -62,14 +61,12 @@
       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
       ;;
@@ -81,3 +78,5 @@
 esac
 
+exit 0
+
 # End modules
Index: bootscripts/lfs/init.d/mountfs
===================================================================
--- bootscripts/lfs/init.d/mountfs	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/mountfs	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -28,9 +29,9 @@
 ### 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
@@ -39,5 +40,5 @@
       rm -f /fastboot /forcefsck
 
-      boot_mesg "Recording existing mounts in /etc/mtab..."
+      log_info_msg "Recording existing mounts in /etc/mtab..."
       > /etc/mtab
 
@@ -51,13 +52,17 @@
       # 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
       ;;
 
Index: bootscripts/lfs/init.d/mountvirtfs
===================================================================
--- bootscripts/lfs/init.d/mountvirtfs	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/mountvirtfs	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -27,30 +28,28 @@
 ### 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}
 
-
-      boot_mesg -n "Mounting virtual file systems:" ${INFO}
-      boot_mesg -n " /run" ${NORMAL}
+      log_info_msg "Mounting virtual file systems: /run" 
 
       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
       ;;
 
@@ -61,3 +60,3 @@
 esac
 
-# End mountvertfs
+# End mountvirtfs
Index: bootscripts/lfs/init.d/network
===================================================================
--- bootscripts/lfs/init.d/network	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/network	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -8,4 +8,5 @@
 #               Nathan Coulson - nathan@linuxfromscratch.org
 #               Kevin P. Fleming - kpfleming@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -34,5 +35,5 @@
          interface=${file##*/ifconfig.}
 
-         # skip if $file is * (because nothing was found)
+         # Skip if $file is * (because nothing was found)
          if [ "${interface}" = "*" ]
          then
@@ -46,16 +47,16 @@
    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
@@ -79,3 +80,5 @@
 esac
 
+exit 0
+
 # End network
Index: bootscripts/lfs/init.d/rc
===================================================================
--- bootscripts/lfs/init.d/rc	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/rc	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/bin/bash
 ########################################################################
 # Begin rc
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
+#             : DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -12,43 +13,79 @@
 ########################################################################
 
-. /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@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@linuxfromscratch.org (Registration required)"}
+DISTRO_MINI=${DISTRO_MINI:-"LFS"}
 
 # These 3 signals will not cause our script to exit
@@ -66,6 +103,25 @@
 
 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
 
@@ -79,32 +135,32 @@
       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
@@ -121,16 +177,21 @@
    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
Index: bootscripts/lfs/init.d/reboot
===================================================================
--- bootscripts/lfs/init.d/reboot	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/reboot	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -25,9 +26,9 @@
 ### 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
       ;;
Index: bootscripts/lfs/init.d/sendsignals
===================================================================
--- bootscripts/lfs/init.d/sendsignals	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/sendsignals	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -25,9 +26,9 @@
 ### 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=${?}
@@ -36,10 +37,10 @@
 
       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=${?}
@@ -48,7 +49,7 @@
 
       if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
-         echo_ok
+         log_success_msg
       else
-         echo_failure
+         log_failure_msg
       fi
       ;;
@@ -61,3 +62,5 @@
 esac
 
+exit 0
+
 # End sendsignals
Index: bootscripts/lfs/init.d/setclock
===================================================================
--- bootscripts/lfs/init.d/setclock	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/setclock	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -26,7 +27,7 @@
 ### END INIT INFO
 
-. /lib/boot/functions
+. /lib/lsb/init-functions
 
-[ -r /etc/sysconfig/clock ] &&  . /etc/sysconfig/clock
+[ -r /etc/sysconfig/clock ] && . /etc/sysconfig/clock
 
 
@@ -44,5 +45,6 @@
 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
@@ -50,5 +52,5 @@
 
    stop)
-      boot_mesg "Setting hardware clock..."
+      log_info_msg "Setting hardware clock..."
       hwclock --systohc ${CLOCKPARAMS} >/dev/null
       evaluate_retval
@@ -57,5 +59,8 @@
    *)
       echo "Usage: ${0} {start|stop}"
+      exit 1
       ;;
 
 esac
+
+exit 0
Index: bootscripts/lfs/init.d/swap
===================================================================
--- bootscripts/lfs/init.d/swap	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/swap	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -26,9 +27,9 @@
 ### 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
@@ -36,5 +37,5 @@
 
    stop)
-      boot_mesg "Deactivating all swap files/partitions..."
+      log_info_msg "Deactivating all swap files/partitions..."
       swapoff -a
       evaluate_retval
@@ -48,7 +49,5 @@
 
    status)
-      boot_mesg "Retrieving swap status." ${INFO}
-      echo_ok
-      echo
+      log_success_msg "Retrieving swap status." 
       swapon -s
       ;;
@@ -60,3 +59,5 @@
 esac
 
+exit 0
+
 # End swap
Index: bootscripts/lfs/init.d/sysctl
===================================================================
--- bootscripts/lfs/init.d/sysctl	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/sysctl	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -8,4 +8,5 @@
 # Authors     : Nathan Coulson (nathan@linuxfromscratch.org)
 #               Matthew Burgress (matthew@linuxfromscratch.org)
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -28,10 +29,10 @@
 ### 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
@@ -49,3 +50,5 @@
 esac
 
+exit 0
+
 # End sysctl
Index: bootscripts/lfs/init.d/sysklogd
===================================================================
--- bootscripts/lfs/init.d/sysklogd	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/sysklogd	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -26,27 +27,33 @@
 ### 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
       ;;
 
@@ -57,14 +64,11 @@
       ;;
 
-   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
Index: bootscripts/lfs/init.d/template
===================================================================
--- bootscripts/lfs/init.d/template	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/template	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -26,20 +26,15 @@
 ### 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
-      ;;
-
-   reload)
-      boot_mesg "Reloading..."
-      reloadproc
+      log_info_msg "Stopping..."
+      killproc fully_qualified_path
       ;;
 
@@ -50,13 +45,11 @@
       ;;
 
-   status)
-      statusproc
-      ;;
-
    *)
-      echo "Usage: ${0} {start|stop|reload|restart|status}"
+      echo "Usage: ${0} {start|stop|restart}"
       exit 1
       ;;
 esac
 
+exit 0
+
 # End scriptname
Index: bootscripts/lfs/init.d/udev
===================================================================
--- bootscripts/lfs/init.d/udev	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/udev	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Zack Winkles, Alexander E. Patrakov
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -26,17 +27,17 @@
 ### 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
@@ -50,12 +51,13 @@
          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
@@ -83,5 +85,5 @@
       # Now wait for udevd to process the uevents we triggered
       /sbin/udevadm settle
-      evaluate_retval
+      log_success_msg2 
       ;;
 
@@ -92,3 +94,5 @@
 esac
 
+exit 0
+
 # End udev
Index: bootscripts/lfs/init.d/udev_retry
===================================================================
--- bootscripts/lfs/init.d/udev_retry	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/init.d/udev_retry	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -6,4 +6,5 @@
 #
 # Authors     : Alexander E. Patrakov
+#               DJ Lucas - dj@linuxfromscratch.org
 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
 #
@@ -27,15 +28,15 @@
 ### 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
@@ -58,3 +59,5 @@
 esac
 
+exit 0
+
 # End udev_retry
Index: bootscripts/lfs/lib/services/init-functions
===================================================================
--- bootscripts/lfs/lib/services/init-functions	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/lib/services/init-functions	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,677 @@
+#!/bin/sh
+########################################################################
+# 
+# Begin /lib/lsb/init-funtions
+#
+# Description : Run Level Control Functions
+#
+# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#             : DJ Lucas - dj@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@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
Index: bootscripts/lfs/lib/services/ipv4-static
===================================================================
--- bootscripts/lfs/lib/services/ipv4-static	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/lib/services/ipv4-static	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,89 @@
+#!/bin/sh
+########################################################################
+# Begin /lib/services/ipv4-static
+#
+# Description : IPV4 Static Boot Script
+#
+# Authors     : Nathan Coulson - nathan@linuxfromscratch.org
+#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@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
Index: bootscripts/lfs/lib/services/ipv4-static-route
===================================================================
--- bootscripts/lfs/lib/services/ipv4-static-route	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/lib/services/ipv4-static-route	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,92 @@
+#!/bin/sh
+########################################################################
+# Begin /lib/services/ipv4-static-route
+#
+# Description : IPV4 Static Route Script
+#
+# Authors     : Kevin P. Fleming - kpfleming@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@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
Index: bootscripts/lfs/sbin/ifdown
===================================================================
--- bootscripts/lfs/sbin/ifdown	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/sbin/ifdown	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,98 @@
+#!/bin/bash 
+########################################################################
+# Begin /sbin/ifdown
+#
+# Description : Interface Down
+#
+# Authors     : Nathan Coulson - nathan@linuxfromscratch.org
+#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@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
Index: bootscripts/lfs/sbin/ifup
===================================================================
--- bootscripts/lfs/sbin/ifup	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/sbin/ifup	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,110 @@
+#!/bin/sh
+########################################################################
+# Begin /sbin/ifup
+#
+# Description : Interface Up
+#
+# Authors     : Nathan Coulson - nathan@linuxfromscratch.org
+#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@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
Index: bootscripts/lfs/sbin/ifup.8
===================================================================
--- bootscripts/lfs/sbin/ifup.8	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/sbin/ifup.8	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -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@linuxfromscratch.org> and Kevin P. Fleming 
+       <kpfleming@linuxfromscratch.org>
+       and updated by Bruce Dubbs <bdubbs@linuxfromscratch>.
+
+SEE ALSO
+       ip(8).
+
+IFUP/IFDOWN                   18 Sep 2011                 ifup(8)
Index: bootscripts/lfs/sysconfig/createfiles
===================================================================
--- bootscripts/lfs/sysconfig/createfiles	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/sysconfig/createfiles	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -9,19 +9,22 @@
 #
 # 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.
 ########################################################################
 
Index: otscripts/lfs/sysconfig/network-devices/ifdown
===================================================================
--- bootscripts/lfs/sysconfig/network-devices/ifdown	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ 	(revision )
@@ -1,66 +1,0 @@
-#!/bin/sh
-########################################################################
-# Begin /sbin/ifdown
-#
-# Description : Interface Down
-#
-# Authors     : Nathan Coulson - nathan@linuxfromscratch.org
-#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
-# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
-#
-# Version     : LFS 7.0
-#
-# Notes       : the IFCONFIG variable is passed to the scripts found
-#               in the /lib/boot directory, to indicate what file the
-#               service should source to get environmental variables.
-#
-########################################################################
-
-file=/etc/sysconfig/ifconfig.${1}
-
-# Skip backup files
-[ "${file}" = "${file%""~""}" ] || exit 0
-
-. /lib/boot/functions 
-
-if [ ! -r "${file}" ]; then
-   boot_mesg "${file} is missing or cannot be accessed." ${WARNING}
-   echo_warning
-   exit 1
-fi
-
-. ${file}
-
-if [ "$IFACE" = "" ]; then
-   boot_mesg "${file} does not define an interface [IFACE]." ${FAILURE}
-   echo_failure
-   exit 1
-fi
-
-# This will run the service script, if SERVICE is set
-if [ -n "${SERVICE}" -a -x "/lib/boot/${SERVICE}" ]; then
-   if ip link show ${IFACE} > /dev/null 2>&1; then
-      IFCONFIG=${file} /lib/boot/${SERVICE} ${IFACE} down
-   else
-      boot_mesg "Interface ${1} doesn't exist." ${WARNING}
-      echo_warning
-   fi
-else
-   boot_mesg "Unable to process ${file}.  Either" ${FAILURE}
-   boot_mesg "the SERVICE variable was not set"
-   boot_mesg "or the specified service cannot be executed."
-   echo_failure
-   exit 1
-fi
-
-link_status=`ip link show ${IFACE} 2>/dev/null`
-
-if [ -n "${link_status}" ]; then
-   if echo "${link_status}" | grep -q UP; then
-      boot_mesg "Bringing down the ${IFACE} interface..."
-      ip link set ${IFACE} down
-      evaluate_retval
-   fi
-fi
-
-# End /sbin/ifdown
Index: otscripts/lfs/sysconfig/network-devices/ifup
===================================================================
--- bootscripts/lfs/sysconfig/network-devices/ifup	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ 	(revision )
@@ -1,82 +1,0 @@
-#!/bin/sh
-########################################################################
-# Begin /sbin/ifup
-#
-# Description : Interface Up
-#
-# Authors     : Nathan Coulson - nathan@linuxfromscratch.org
-#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
-# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
-#
-# Version     : LFS 7.0
-#
-# Notes       : The IFCONFIG variable is passed to the SERVICE script
-#               in the /lib/boot directory, to indicate what file the
-#               service should source to get environmental variables.
-#
-########################################################################
-
-file=/etc/sysconfig/ifconfig.${1}
-
-# Skip backup files
-[ "${file}" = "${file%""~""}" ] || exit 0
-
-. /lib/boot/functions
-
-boot_mesg "Bringing up the ${1} interface..."
-boot_mesg_flush
-
-if [ ! -r "${file}" ]; then
-   boot_mesg "${file} is missing or cannot be accessed." ${WARNING}
-   echo_warning
-   exit 1
-fi
-
-. $file
-
-if [ "$IFACE" = "" ]; then
-   boot_mesg "${file} does not define an interface [IFACE]." ${FAILURE}
-   echo_failure
-   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
-   echo_skipped
-   exit 0
-fi
-
-if [ -n "${SERVICE}" -a -x "/lib/boot/${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
-         boot_mesg "Interface ${IFACE} doesn't exist." ${WARNING}
-         echo_warning
-      fi
-   fi
-
-   IFCONFIG=${file} /lib/boot/${SERVICE} ${IFACE} up
-
-else
-   boot_mesg "Unable to process ${file}.  Either" ${FAILURE}
-   boot_mesg "the SERVICE variable was not set"
-   boot_mesg "or the specified service cannot be executed."
-   echo_failure
-   exit 1
-fi
-
-# End /sbin/ifup
Index: otscripts/lfs/sysconfig/network-devices/services/ipv4-static
===================================================================
--- bootscripts/lfs/sysconfig/network-devices/services/ipv4-static	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#!/bin/sh
-########################################################################
-# Begin /lib/boot/ipv4-static
-#
-# Description : IPV4 Static Boot Script
-#
-# Authors     : Nathan Coulson - nathan@linuxfromscratch.org
-#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
-# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
-#
-# Version     : LFS 7.0
-#
-########################################################################
-
-. /lib/boot/functions
-. ${IFCONFIG}
-
-if [ -z "${IP}" ]; then
-   boot_mesg "IP variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
-   echo_failure
-   exit 1
-fi
-
-if [ -z "${PREFIX}" -a -z "${PEER}" ]; then
-   boot_mesg -n "PREFIX variable missing from ${IFCONFIG}," ${WARNING}
-   boot_mesg " assuming 24."
-   echo_warning
-   PREFIX=24
-   args="${args} ${IP}/${PREFIX}"
-
-elif [ -n "${PREFIX}" -a -n "${PEER}" ]; then
-   boot_mesg "PREFIX and PEER both specified in ${IFCONFIG}, cannot continue." ${FAILURE}
-   echo_failure
-   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)
-      boot_mesg "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
-            boot_mesg "Gateway already setup; skipping." ${WARNING}
-            echo_warning
-         else
-            boot_mesg "Setting up default gateway..."
-            ip route add default via ${GATEWAY} dev ${1}
-            evaluate_retval
-          fi
-      fi
-   ;;
-
-   down)
-      if [ -n "${GATEWAY}" ]; then
-         boot_mesg "Removing default gateway..."
-         ip route del default
-         evaluate_retval
-      fi
-
-      boot_mesg "Removing IPv4 address ${IP} from the ${1} interface..."
-      ip addr del ${args} dev ${1}
-      evaluate_retval
-   ;;
-
-   *)
-      echo "Usage: ${0} [interface] {up|down}"
-      exit 1
-   ;;
-esac
-
-# End /lib/boot/ipv4-static
Index: otscripts/lfs/sysconfig/network-devices/services/ipv4-static-route
===================================================================
--- bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ 	(revision )
@@ -1,95 +1,0 @@
-#!/bin/sh
-########################################################################
-# Begin /lib/boot/ipv4-static-route
-#
-# Description : IPV4 Static Route Script
-#
-# Authors     : Kevin P. Fleming - kpfleming@linuxfromscratch.org
-# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
-#
-# Version     : LFS 7.0
-#
-########################################################################
-
-. /lib/boot/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 "
-   ;;
-
-   (*)
-      boot_mesg "Unknown route type (${TYPE}) in ${IFCONFIG}, cannot continue." ${FAILURE}
-      echo_failure
-      exit 1
-   ;;
-esac
-
-if [ -n "${need_ip}" ]; then
-   if [ -z "${IP}" ]; then
-      boot_mesg "IP variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
-      echo_failure
-      exit 1
-   fi
-
-   if [ -z "${PREFIX}" ]; then
-      boot_mesg "PREFIX variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
-      echo_failure
-      exit 1
-   fi
-   
-   args="${args} ${IP}/${PREFIX}"
-   desc="${desc}${IP}/${PREFIX}"
-fi
-
-if [ -n "${need_gateway}" ]; then
-   if [ -z "${GATEWAY}" ]; then
-      boot_mesg "GATEWAY variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
-      echo_failure
-      exit 1
-   fi
-   args="${args} via ${GATEWAY}"
-fi
-
-if [ -n "${SOURCE}" ]; then
-        args="${args} src ${SOURCE}"
-fi
-
-case "${2}" in
-   up)
-      boot_mesg "Adding '${desc}' route to the ${1} interface..."
-      ip route add ${args} dev ${1}
-      evaluate_retval
-   ;;
-   
-   down)
-      boot_mesg "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 /bib/boot/ipv4-static-route
Index: bootscripts/lfs/sysconfig/rc
===================================================================
--- bootscripts/lfs/sysconfig/rc	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ bootscripts/lfs/sysconfig/rc	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -8,5 +8,5 @@
 # Version     : 00.00
 #
-# Notes       :
+# Notes       :  Not used by LFS, but present for BLFS compatibility
 #
 ########################################################################
Index: bootscripts/lfs/sysconfig/rc.site
===================================================================
--- bootscripts/lfs/sysconfig/rc.site	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ bootscripts/lfs/sysconfig/rc.site	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,61 @@
+# rc.site
+# Optional parameters for boot scripts.
+
+# Distro Information
+DISTRO="Linux From Scratch" # The distro name
+DISTRO_CONTACT="lfs-dev@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=
+
Index: chapter01/changelog.xml
===================================================================
--- chapter01/changelog.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter01/changelog.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -37,4 +37,44 @@
 
 -->
+    <listitem>
+      <para>2011-09-18</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Review and update recent changes to bootscripts.</para>
+          <itemizedlist>
+             <listitem><para>Rename /etc/sysconfig/init_params to /etc/sysconfig/rc.site.</para>
+             </listitem>
+             <listitem><para>Move network services to /lib/services.</para></listitem>
+             <listitem><para>Move init-functions to /lib/lsb.</para></listitem>
+             <listitem><para>Make /lib/lsb a symlink to /lib/services.</para></listitem>
+             <listitem><para>Create convenience symlink /etc/init.d->/etc/rc.d/init.d
+                       </para></listitem>
+             <listitem><para>Add help and man pages to ifup/ifdown.
+                             </para></listitem>
+             <listitem><para>Append /run/var/bootlog to /var/log/boot.log at the end of
+                  the boot sequence.</para></listitem>
+             <listitem><para>Add capability to step through the boot scripts at boot time.
+                  </para></listitem>
+             <listitem><para>Optionally allow environment variables in sysconfig directory's
+                  console, network, and clock files to be placed in rc.site.
+                  </para></listitem>
+             <listitem><para>Add an optional FASTBOOT parameter to set /fastboot when rebooting.
+                  </para></listitem>
+          </itemizedlist>
+        </listitem>
+        <listitem>
+           <para>[bdubbs] - Remove a minor warning message from udev that is triggered
+           by the udev_retry boot script.</para>
+        </listitem>
+        <listitem>
+           <para>[bdubbs] - Add SKIPTMPCLEAN as an optional parameter to skip cleaning
+           /tmp at boot time.</para>
+        </listitem>
+        <listitem>
+           <para>[bdubbs] - Add a page to Chapter 7 documenting rc.site.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
     <listitem>
       <para>2011-09-04</para>
Index: chapter05/binutils-pass2.xml
===================================================================
--- chapter05/binutils-pass2.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter05/binutils-pass2.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -53,8 +53,8 @@
 <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>The meaning of the new configure options:</title>
Index: chapter06/udev.xml
===================================================================
--- chapter06/udev.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter06/udev.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -41,4 +41,10 @@
   <sect2 role="installation">
     <title>Installation of Udev</title>
+
+    <para>Optionally remove an unneeded warning message that shows up in this
+    version of udev at boot time.</para>
+
+<screen><userinput remap="pre">sed -i -e '/deprecated/d' udev/udevadm-trigger.c</userinput></screen>
+
 
     <para>The udev-config tarball contains LFS-specific files used to configure
Index: chapter07/bootscripts.xml
===================================================================
--- chapter07/bootscripts.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter07/bootscripts.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -59,5 +59,6 @@
         sendsignals, setclock, static, swap, sysctl, sysklogd, template,
         udev, and 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>
Index: chapter07/chapter07.xml
===================================================================
--- chapter07/chapter07.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter07/chapter07.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -23,4 +23,5 @@
   <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"/>
Index: chapter07/network.xml
===================================================================
--- chapter07/network.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter07/network.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -158,5 +158,5 @@
     obtaining the IP address. The LFS-Bootscripts package has a modular IP
     assignment format, and creating additional files in the <filename
-    class="directory">/lib/boot/</filename> directory allows other IP
+    class="directory">/lib/services/</filename> directory allows other IP
     assignment methods. This is commonly used for Dynamic Host Configuration
     Protocol (DHCP), which is addressed in the BLFS book.</para>
Index: chapter07/setclock.xml
===================================================================
--- chapter07/setclock.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter07/setclock.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -64,5 +64,5 @@
 
   <note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set
-  in the <filename>/etc/sysconfig/init_params</filename> file.</para></note>
+  in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note>
 
 </sect1>
Index: chapter07/site.xml
===================================================================
--- chapter07/site.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
+++ chapter07/site.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -0,0 +1,35 @@
+<?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>The rc.site File</title>
+
+  <indexterm zone="ch-scripts-site">
+    <primary sortas="a-rc.site">rc.site</primary>
+  </indexterm>
+
+  <para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains
+  settings that are automatically set for each boot script.  It can alternatively
+  set the values specified in the <filename>hostname</filename>,
+  <filename>console</filename>, and <filename>clock</filename> files in the
+  <filename class='directory'>/etc/sysconfig/</filename> directory.  If the
+  associated variables are present in both these separate files and
+  <filename>rc.site</filename>, the values in the script specific files have
+  precedence. </para>
+
+  <para><filename>rc.site</filename> also contains parameters that can 
+  customize other aspects of the boot process.  Setting the IPROMPT variable
+  will enable selective running of bootscripts.  Other options are described
+  in the file comments.  The default version of the file is as follows:</para>
+
+  <screen>&site;</screen>
+
+</sect1>
+
Index: chapter07/sysklogd.xml
===================================================================
--- chapter07/sysklogd.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter07/sysklogd.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -20,6 +20,6 @@
   option.  This option turns off the periodic timestamp mark that
   <command>syslogd</command> writes to the log files every 20 minutes by
-  default.  If you want to turn on this periodic timestamp mark, create or edit
-  <filename>/etc/sysconfig/init_params</filename> and define the variable
+  default.  If you want to turn on this periodic timestamp mark, edit
+  <filename>/etc/sysconfig/rc.site</filename> and define the variable
   SYSKLOGD_PARMS to the desired value.  For instance, to remove all parameters,
   set the variable to a null value:</para>
Index: chapter07/usage.xml
===================================================================
--- chapter07/usage.xml	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ chapter07/usage.xml	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -60,5 +60,5 @@
 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
@@ -94,5 +94,5 @@
 
   <para>As a convenience, the <command>rc</command> script reads a library of
-  functions in <filename class="directory">/lib/boot/functions</filename>.
+  functions in <filename class="directory">/lib/lsb/init-functions</filename>.
   This library also reads an optional configuration file,
   <filename>/etc/sysconfig/init_params</filename>.  Any of the system
Index: general.ent
===================================================================
--- general.ent	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ general.ent	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -1,4 +1,4 @@
-<!ENTITY version "SVN-20110904">
-<!ENTITY releasedate "Sep 4, 2011">
+<!ENTITY version "SVN-20110918">
+<!ENTITY releasedate "Sep 18, 2011">
 <!ENTITY copyrightdate "1999-2011"><!-- jhalfs needs a literal dash, not &ndash; -->
 <!ENTITY milestone "7.0">
Index: packages.ent
===================================================================
--- packages.ent	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ packages.ent	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -299,5 +299,5 @@
 <!ENTITY less-ch6-sbu "less than 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 KB">         <!-- Updated in Makefile -->
 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
Index: process-scripts.sh
===================================================================
--- process-scripts.sh	(revision 103bbd63fe104a52e181da0653c43212b990f5e6)
+++ process-scripts.sh	(revision f874424cabc59e63f2458c25527f7c18632194a9)
@@ -4,6 +4,6 @@
 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)
@@ -11,5 +11,5 @@
   # Skip directories
   [ $script == 'network-devices' ] && continue
-  [ $script == 'services'        ] && continue
+  #[ $script == 'services'        ] && continue
 
   # Disambiguate duplicate file names
