Subversion Repositories svn LFS-FR

Compare Revisions

Ignore whitespace Rev 1400 → Rev 1401

/trunk/hlfs/lfs-bootscripts-20100627.tar.bz2
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/hlfs/lfs-bootscripts-20100627.tar.bz2
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: make-aux-files.sh
===================================================================
--- make-aux-files.sh (revision 1400)
+++ make-aux-files.sh (revision 1401)
@@ -1,14 +1,14 @@
#!/bin/bash
-rm -f lfs-bootscripts*.tar.bz2
+rm -f hlfs-bootscripts*.tar.bz2
# Get base file name and move bootscripts directory to that name
-version=`grep "ENTITY lfs-bootscripts-version" packages.ent |cut -d'"' -f2`
-mv bootscripts lfs-bootscripts-$version
+version=`grep "ENTITY hlfs-bootscripts-version" packages.ent |cut -d'"' -f2`
+mv bootscripts hlfs-bootscripts-$version
# Create the tarball and clean up
-tar -cjf lfs-bootscripts-$version.tar.bz2 --exclude .svn lfs-bootscripts-$version
-mv lfs-bootscripts-$version bootscripts
+tar -cjf hlfs-bootscripts-$version.tar.bz2 --exclude .svn hlfs-bootscripts-$version
+mv hlfs-bootscripts-$version bootscripts
rm -f udev-config*.bz2
/trunk/hlfs/aux-file-data.sh
8,7 → 8,7
FILE=$1
 
# Bootscript data
bootscripts=$(ls lfs-bootscripts*.bz2)
bootscripts=$(ls hlfs-bootscripts*.bz2)
base=$(basename $bootscripts .tar.bz2)
bootsize=$(ls -lk $bootscripts | cut -f5 -d" ")
bootmd5=$(md5sum $bootscripts | cut -f1 -d" ")
/trunk/hlfs/packages.ent
266,6 → 266,14
<!ENTITY gzip-ch6-du "3.3 Mio">
<!ENTITY gzip-ch6-sbu "moins de 0.1 SBU">
 
<!ENTITY hlfs-bootscripts-version "20110816"> <!-- Scripts depend on this format -->
<!ENTITY hlfs-bootscripts-size "44 Kio">
<!ENTITY hlfs-bootscripts-url "&downloads-root;hlfs-bootscripts-&hlfs-bootscripts-version;.tar.bz2">
<!ENTITY hlfs-bootscripts-md5 "0cddbf0ccecef04808fad64d09d7b6a7">
<!ENTITY hlfs-bootscripts-home " ">
<!ENTITY hlfs-bootscripts-ch7-du "468 KB">
<!ENTITY hlfs-bootscripts-ch7-sbu "less than 0.1 SBU">
 
<!ENTITY iana-etc-version "2.30">
<!ENTITY iana-etc-size "201 Kio">
<!ENTITY iana-etc-url "http://sethwklein.net/iana-etc-&iana-etc-version;.tar.bz2">
289,6 → 297,14
<!ENTITY iproute2-home "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2">
<!ENTITY iproute2-ch6-du "5.7 Mio">
<!ENTITY iproute2-ch6-sbu "0.2 SBU">
<!ENTITY iptables-version "1.4.7">
<!ENTITY iptables-size "456 Kio">
<!ENTITY iptables-url "http://www.netfilter.org/projects/iptables/files/iptables-&iptables-version;.tar.bz2">
<!ENTITY iptables-md5 "645941dd1f9e0ec1f74c61918d70d52f">
<!ENTITY iptables-home "http://www.netfilter.org/projects/iptables/">
<!ENTITY iptables-ch6-du "10.5 Mio">
<!ENTITY iptables-ch6-sbu "0.2 SBU">
 
<!ENTITY kbd-version "1.15.2">
<!ENTITY kbd-size "1,520 Kio">
306,14 → 322,6
<!ENTITY less-ch6-du "2.9 Mio">
<!ENTITY less-ch6-sbu "moins de 0.1 SBU">
 
<!ENTITY lfs-bootscripts-version "20100627"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-size "43 Kio">
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
<!ENTITY lfs-bootscripts-md5 "8d9bdd8176ccf4c26a86f76e97c1e9ca">
<!ENTITY lfs-bootscripts-home " ">
<!ENTITY lfs-bootscripts-ch7-du "468 Kio">
<!ENTITY lfs-bootscripts-ch7-sbu "moins de 0.1 SBU">
 
<!ENTITY libcap2-version "2.21">
<!ENTITY libcap2-size "56 Kio">
<!ENTITY libcap2-url "http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.21.tar.bz2">
/trunk/hlfs/bootscripts/lfs/sysconfig/rc
File deleted
/trunk/hlfs/bootscripts/lfs/sysconfig/createfiles
File deleted
/trunk/hlfs/bootscripts/lfs/sysconfig/modules
File deleted
/trunk/hlfs/bootscripts/lfs/sysconfig/network-devices/ifup
File deleted
/trunk/hlfs/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static
File deleted
/trunk/hlfs/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route
File deleted
/trunk/hlfs/bootscripts/lfs/sysconfig/network-devices/ifdown
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/udev_retry
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/halt
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/network
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/reboot
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/mountfs
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/sysklogd
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/localnet
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/console
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/udev
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/rc
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/consolelog
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/checkfs
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/setclock
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/modules
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/functions
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/sendsignals
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/swap
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/mountkernfs
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/template
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/cleanfs
File deleted
/trunk/hlfs/bootscripts/lfs/init.d/sysctl
File deleted
/trunk/hlfs/bootscripts/ChangeLog
1,3 → 1,6
2011-08-16 Robert Connolly <robert@linuxfromscratch.org>
* lfs/init.d/random: New file, from BLFS. Save and use random seed with
/dev/urandom.
2010-05-29 Matt Burgess <matthew@linuxfromscratch.org>
* lfs/init.d/udev: Only copy /lib/udev/devices/null, as Udev >= 155 copies
devices from /lib/udev/devices to /dev itself. Udevd still needs /dev/null
/trunk/hlfs/bootscripts/hlfs/iptables
0,0 → 1,60
#!/bin/sh
# Begin $rc_base/init.d/iptables
 
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 15:29:19 -0400 (Mon, 01 Aug 2005) $
 
. /etc/sysconfig/rc
. $rc_functions
 
case "$1" in
start)
if [ -x /etc/rc.d/rc.iptables ]; then
boot_mesg "Starting iptables..."
loadproc /etc/rc.d/rc.iptables
fi
;;
 
lock)
boot_mesg "Locking system iptables firewall..."
/sbin/iptables --policy INPUT DROP
/sbin/iptables --policy OUTPUT DROP
/sbin/iptables --policy FORWARD DROP
/sbin/iptables --flush
/sbin/iptables -t nat --flush
/sbin/iptables -t mangle --flush
/sbin/iptables --delete-chain
/sbin/iptables -t nat --delete-chain
/sbin/iptables -t mangle --delete-chain
/sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -A OUTPUT -o lo -j ACCEPT
boot_mesg_flush
;;
 
clear)
boot_mesg "Clearing system iptables iptables..."
/sbin/iptables --policy INPUT ACCEPT
/sbin/iptables --policy OUTPUT ACCEPT
/sbin/iptables --policy FORWARD ACCEPT
/sbin/iptables --flush
/sbin/iptables -t nat --flush
/sbin/iptables -t mangle --flush
/sbin/iptables --delete-chain
/sbin/iptables -t nat --delete-chain
/sbin/iptables -t mangle --delete-chain
boot_mesg_flush
;;
 
status)
/sbin/iptables --numeric --list
/sbin/iptables -t nat --numeric --list
/sbin/iptables -t mangle --numeric --list
;;
 
*)
echo "Usage: $0 {start|clear|lock|status}"
exit 1
;;
esac
 
# End $rc_base/init.d/iptables
/trunk/hlfs/bootscripts/hlfs/sysconfig/rc
0,0 → 1,18
########################################################################
# Begin /etc/sysconfig/rc
#
# Description : rc script configuration
#
# Authors :
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
rc_base=/etc/rc.d
rc_functions=${rc_base}/init.d/functions
network_devices=/etc/sysconfig/network-devices
 
# End /etc/sysconfig/rc
/trunk/hlfs/bootscripts/hlfs/sysconfig/createfiles
0,0 → 1,28
########################################################################
# Begin /etc/sysconfig/createfiles
#
# Description : Createfiles script config file
#
# Authors :
#
# Version : 00.00
#
# Notes : The syntax of this file is as follows:
# if type is equal to "file" or "dir"
# <filename> <type> <permissions> <user> <group>
# if type is equal to "dev"
# <filename> <type> <permissions> <user> <group> <devtype> <major> <minor>
#
# <filename> is the name of the file which is to be created
# <type> is either file, dir, or dev.
# file creates a new file
# dir creates a new directory
# dev creates a new device
# <devtype> is either block, char or pipe
# block creates a block device
# char creates a character deivce
# pipe creates a pipe, this will ignore the <major> and <minor> fields
# <major> and <minor> are the major and minor numbers used for the device.
########################################################################
 
# End /etc/sysconfig/createfiles
/trunk/hlfs/bootscripts/hlfs/sysconfig/modules
0,0 → 1,18
########################################################################
# Begin /etc/sysconfig/modules
#
# Description : Module auto-loading configuration
#
# Authors :
#
# Version : 00.00
#
# Notes : The syntax of this file is as follows:
# <module> [<arg1> <arg2> ...]
#
# Each module should be on it's own line, and any options that you want
# passed to the module should follow it. The line deliminator is either
# a space or a tab.
########################################################################
 
# End /etc/sysconfig/modules
/trunk/hlfs/bootscripts/hlfs/sysconfig/network-devices/ifup
0,0 → 1,90
#!/bin/sh
########################################################################
# Begin $network_devices/ifup
#
# Description : Interface Up
#
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
#
# Version : 00.00
#
# Notes : the IFCONFIG variable is passed to the scripts found
# in the services directory, to indicate what file the
# service should source to get environmental variables.
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
# Collect a list of configuration files for our interface
if [ -n "${2}" ]; then
for file in ${@#$1} # All parameters except $1
do
FILES="${FILES} ${network_devices}/ifconfig.${1}/${file}"
done
elif [ -d "${network_devices}/ifconfig.${1}" ]; then
FILES=`echo ${network_devices}/ifconfig.${1}/*`
else
FILES="${network_devices}/ifconfig.${1}"
fi
 
boot_mesg "Bringing up the ${1} interface..."
boot_mesg_flush
 
# Process each configruation file
for file in ${FILES}; do
# skip backup files
if [ "${file}" != "${file%""~""}" ]; then
continue
fi
 
if [ ! -f "${file}" ]; then
boot_mesg "${file} is not a network configuration file or directory." ${WARNING}
echo_warning
continue
fi
 
(
. ${file}
 
# Will not process this service if started by boot, and ONBOOT
# is not set to yes
if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
continue
fi
# Will not process this service if started by hotplug, and
# ONHOTPLUG is not set to yes
if [ "${IN_HOTPLUG}" = "1" -a "${ONHOTPLUG}" != "yes" \
-a "${HOSTNAME}" != "(none)" ]; then continue
fi
 
if [ -n "${SERVICE}" -a -x "${network_devices}/services/${SERVICE}" ]; then
if [ -z "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" \
-o "${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
if ip link show ${1} > /dev/null 2>&1; then
link_status=`ip link show ${1}`
if [ -n "${link_status}" ]; then
if ! echo "${link_status}" | grep -q UP; then
ip link set ${1} up
fi
fi
else
boot_mesg "Interface ${1} doesn't exist." ${WARNING}
echo_warning
continue
fi
fi
IFCONFIG=${file} ${network_devices}/services/${SERVICE} ${1} 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
continue
fi
)
done
 
# End $network_devices/ifup
/trunk/hlfs/bootscripts/hlfs/sysconfig/network-devices/services/ipv4-static-route
0,0 → 1,97
#!/bin/sh
########################################################################
# Begin $network_devices/services/ipv4-static-route
#
# Description : IPV4 Static Route Script
#
# Authors : Kevin P. Fleming - kpfleming@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_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 $network_devices/services/ipv4-static-route
/trunk/hlfs/bootscripts/hlfs/sysconfig/network-devices/services/ipv4-static
0,0 → 1,82
#!/bin/sh
########################################################################
# Begin $network_devices/services/ipv4-static
#
# Description : IPV4 Static Boot Script
#
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_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 $network_devices/services/ipv4-static
/trunk/hlfs/bootscripts/hlfs/sysconfig/network-devices/ifdown
0,0 → 1,95
#!/bin/sh
########################################################################
# Begin $network_devices/ifdown
#
# Description : Interface Down
#
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
#
# Version : 00.01
#
# Notes : the IFCONFIG variable is passed to the scripts found
# in the services directory, to indicate what file the
# service should source to get environmental variables.
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
# Collect a list of configuration files for our interface
if [ -n "${2}" ]; then
for file in ${@#$1}; do # All parameters except $1
FILES="${FILES} ${network_devices}/ifconfig.${1}/${file}"
done
elif [ -d "${network_devices}/ifconfig.${1}" ]; then
FILES=`echo ${network_devices}/ifconfig.${1}/*`
else
FILES="${network_devices}/ifconfig.${1}"
fi
 
# Reverse the order configuration files are processed in
for file in ${FILES}; do
FILES2="${file} ${FILES2}"
done
FILES=${FILES2}
 
# Process each configuration file
for file in ${FILES}; do
# skip backup files
if [ "${file}" != "${file%""~""}" ]; then
continue
fi
 
if [ ! -f "${file}" ]; then
boot_mesg "${file} is not a network configuration file or directory." ${WARNING}
echo_warning
continue
fi
(
. ${file}
 
# Will not process this service if started by boot, and ONBOOT
# is not set to yes
if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
continue
fi
 
# Will not process this service if started by hotplug, and
# ONHOTPLUG is not set to yes
if [ "${IN_HOTPLUG}" = "1" -a "${ONHOTPLUG}" != "yes" ]; then
continue
fi
# This will run the service script, if SERVICE is set
if [ -n "${SERVICE}" -a -x "${network_devices}/services/${SERVICE}" ]; then
if ip link show ${1} > /dev/null 2>&1
then
IFCONFIG=${file} ${network_devices}/services/${SERVICE} ${1} down
else
boot_mesg "Interface ${1} doesn't exist." ${WARNING}
echo_warning
fi
else
boot_mesg -n "Unable to process ${file}. Either" ${FAILURE}
boot_mesg -n " the SERVICE variable was not set,"
boot_mesg " or the specified service cannot be executed."
echo_failure
continue
fi
)
done
 
if [ -z "${2}" ]; then
link_status=`ip link show $1 2>/dev/null`
if [ -n "${link_status}" ]; then
if echo "${link_status}" | grep -q UP; then
boot_mesg "Bringing down the ${1} interface..."
ip link set ${1} down
evaluate_retval
fi
fi
fi
 
# End $network_devices/ifdown
/trunk/hlfs/bootscripts/hlfs/init.d/random
0,0 → 1,38
#!/bin/sh
# Begin $rc_base/init.d/random
 
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
# Random script elements by Larry Lawrence
 
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 15:29:19 -0400 (Mon, 01 Aug 2005) $
 
. /etc/sysconfig/rc
. $rc_functions
 
case "$1" in
start)
boot_mesg "Initializing kernel random number generator..."
if [ -f /var/tmp/random-seed ]; then
/bin/cat /var/tmp/random-seed >/dev/urandom
fi
/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
count=1 &>/dev/null
evaluate_retval
;;
 
stop)
boot_mesg "Saving random seed..."
/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
count=1 &>/dev/null
evaluate_retval
;;
 
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
 
# End $rc_base/init.d/random
/trunk/hlfs/bootscripts/hlfs/init.d/sysctl
0,0 → 1,39
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/sysctl
#
# Description : File uses /etc/sysctl.conf to set kernel runtime
# parameters
#
# Authors : Nathan Coulson (nathan@linuxfromscratch.org)
# Matthew Burgress (matthew@linuxfromscratch.org)
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
start)
if [ -f "/etc/sysctl.conf" ]; then
boot_mesg "Setting kernel runtime parameters..."
sysctl -q -p
evaluate_retval
fi
;;
 
status)
sysctl -a
;;
 
*)
echo "Usage: ${0} {start|status}"
exit 1
;;
esac
 
# End $rc_base/init.d/sysctl
/trunk/hlfs/bootscripts/hlfs/init.d/udev_retry
0,0 → 1,45
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/udev_retry
#
# Description : Udev cold-plugging script (retry)
#
# Authors : Alexander E. Patrakov
#
# Version : 00.02
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
start)
boot_mesg "Retrying failed uevents, if any..."
 
# From Debian: "copy the rules generated before / was mounted
# read-write":
for file in /dev/.udev/tmp-rules--*; do
dest=${file##*tmp-rules--}
[ "$dest" = '*' ] && break
cat $file >> /etc/udev/rules.d/$dest
rm -f $file
done
 
# Re-trigger the failed uevents in hope they will succeed now
/sbin/udevadm trigger --type=failed --action=add
# Now wait for udevd to process the uevents we triggered
/sbin/udevadm settle
evaluate_retval
;;
 
*)
echo "Usage ${0} {start}"
exit 1
;;
esac
 
# End $rc_base/init.d/udev_retry
/trunk/hlfs/bootscripts/hlfs/init.d/halt
0,0 → 1,28
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/halt
#
# Description : Halt Script
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
stop)
halt -d -f -i -p
;;
*)
echo "Usage: {stop}"
exit 1
;;
esac
 
# End $rc_base/init.d/halt
/trunk/hlfs/bootscripts/hlfs/init.d/network
0,0 → 1,73
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/network
#
# Description : Network Control Script
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
# Nathan Coulson - nathan@linuxfromscratch.org
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
. /etc/sysconfig/network
 
case "${1}" in
start)
# Start all network interfaces
for file in ${network_devices}/ifconfig.*
do
interface=${file##*/ifconfig.}
 
# skip if $file is * (because nothing was found)
if [ "${interface}" = "*" ]
then
continue
fi
 
IN_BOOT=1 ${network_devices}/ifup ${interface}
done
;;
 
stop)
# Reverse list
FILES=""
for file in ${network_devices}/ifconfig.*
do
FILES="${file} ${FILES}"
done
 
# Stop all network interfaces
for file in ${FILES}
do
interface=${file##*/ifconfig.}
 
# skip if $file is * (because nothing was found)
if [ "${interface}" = "*" ]
then
continue
fi
 
IN_BOOT=1 ${network_devices}/ifdown ${interface}
done
;;
 
restart)
${0} stop
sleep 1
${0} start
;;
 
*)
echo "Usage: ${0} {start|stop|restart}"
exit 1
;;
esac
 
# End /etc/rc.d/init.d/network
/trunk/hlfs/bootscripts/hlfs/init.d/reboot
0,0 → 1,31
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/reboot
#
# Description : Reboot Scripts
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
stop)
boot_mesg "Restarting system..."
reboot -d -f -i
;;
 
*)
echo "Usage: ${0} {stop}"
exit 1
;;
 
esac
 
# End $rc_base/init.d/reboot
/trunk/hlfs/bootscripts/hlfs/init.d/mountfs
0,0 → 1,54
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/mountfs
#
# Description : File System Mount Script
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
start)
boot_mesg "Remounting root file system in read-write mode..."
mount -n -o remount,rw / >/dev/null
evaluate_retval
 
# Remove fsck-related file system watermarks.
rm -f /fastboot /forcefsck
 
boot_mesg "Recording existing mounts in /etc/mtab..."
> /etc/mtab
mount -f / || failed=1
mount -f /proc || failed=1
mount -f /sys || failed=1
(exit ${failed})
evaluate_retval
 
# 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..."
mount -a -O no_netdev >/dev/null
evaluate_retval
;;
 
stop)
boot_mesg "Unmounting all other currently mounted file systems..."
umount -a -d -r >/dev/null
evaluate_retval
;;
 
*)
echo "Usage: ${0} {start|stop}"
exit 1
;;
esac
 
# End $rc_base/init.d/mountfs
/trunk/hlfs/bootscripts/hlfs/init.d/sysklogd
0,0 → 1,57
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/sysklogd
#
# Description : Sysklogd loader
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
start)
boot_mesg "Starting system log daemon..."
loadproc syslogd -m 0
 
boot_mesg "Starting kernel log daemon..."
loadproc klogd
;;
 
stop)
boot_mesg "Stopping kernel log daemon..."
killproc klogd
 
boot_mesg "Stopping system log daemon..."
killproc syslogd
;;
 
reload)
boot_mesg "Reloading system log daemon config file..."
reloadproc syslogd
;;
 
restart)
${0} stop
sleep 1
${0} start
;;
 
status)
statusproc syslogd
statusproc klogd
;;
 
*)
echo "Usage: ${0} {start|stop|reload|restart|status}"
exit 1
;;
esac
 
# End $rc_base/init.d/sysklogd
/trunk/hlfs/bootscripts/hlfs/init.d/localnet
0,0 → 1,54
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/localnet
#
# Description : Loopback device
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
. /etc/sysconfig/network
 
case "${1}" in
start)
boot_mesg "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}..."
hostname ${HOSTNAME}
evaluate_retval
;;
 
stop)
boot_mesg "Bringing down the loopback interface..."
ip link set lo down
evaluate_retval
;;
 
restart)
${0} stop
sleep 1
${0} start
;;
 
status)
echo "Hostname is: $(hostname)"
ip link show lo
;;
 
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
 
# End $rc_base/init.d/localnet
/trunk/hlfs/bootscripts/hlfs/init.d/console
0,0 → 1,96
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/console
#
# Description : Sets keymap and screen font
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
# Alexander E. Patrakov
#
# Version : 00.03
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
# Native English speakers probably don't have /etc/sysconfig/console at all
if [ -f /etc/sysconfig/console ]
then
. /etc/sysconfig/console
else
exit 0
fi
 
is_true() {
[ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
}
 
failed=0
 
case "${1}" in
start)
boot_mesg "Setting up Linux console..."
# There should be no bogus failures below this line!
# Figure out if a framebuffer console is used
[ -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"
# 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}" ] ||
MODE_COMMAND="${MODE_COMMAND} && setfont ${FONT}"
 
# Apply that command to all consoles mentioned in
# /etc/inittab. Important: in the UTF-8 mode this should
# happen before setfont, otherwise a kernel bug will
# show up and the unicode map of the font will not be
# used.
# FIXME: Fedora Core also initializes two spare consoles
# - do we want that?
for TTY in `grep '^[^#].*respawn:/sbin/agetty' /etc/inittab |
grep -o '\btty[[:digit:]]*\b'`
do
openvt -f -w -c ${TTY#tty} -- \
/bin/sh -c "${MODE_COMMAND}" || failed=1
done
 
# Set the font (if not already set above) and the keymap
is_true "${USE_FB}" || [ -z "${FONT}" ] ||
setfont $FONT ||
failed=1
[ -z "${KEYMAP}" ] ||
loadkeys ${KEYMAP} >/dev/null 2>&1 ||
failed=1
[ -z "${KEYMAP_CORRECTIONS}" ] ||
loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 ||
failed=1
 
# Convert the keymap from $LEGACY_CHARSET to UTF-8
[ -z "$LEGACY_CHARSET" ] ||
dumpkeys -c "$LEGACY_CHARSET" |
loadkeys -u >/dev/null 2>&1 ||
failed=1
 
# If any of the commands above failed, the trap at the
# top would set $failed to 1
( exit $failed )
evaluate_retval
;;
*)
echo $"Usage:" "${0} {start}"
exit 1
;;
esac
 
# End $rc_base/init.d/console
/trunk/hlfs/bootscripts/hlfs/init.d/udev
0,0 → 1,80
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/udev
#
# Description : Udev cold-plugging script
#
# Authors : Zack Winkles, Alexander E. Patrakov
#
# Version : 00.02
#
# Notes :
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
case "${1}" in
start)
boot_mesg "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}
read ENTER
/etc/rc.d/init.d/halt stop
fi
 
# Mount a temporary file system over /dev, so that any devices
# made or removed during this boot don't affect the next one.
# The reason we don't write to mtab is because we don't ever
# want /dev to be unavailable (such as by `umount -a').
if ! mountpoint /dev > /dev/null; then
mount -n -t tmpfs tmpfs /dev -o mode=755
fi
if [ ${?} != 0 ]; then
echo_failure
boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" ${FAILURE}
boot_mesg -n " onto /dev, this system will be halted."
boot_mesg -n "\n\nAfter you press Enter, this system"
boot_mesg -n " will be halted and powered off."
boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
boot_mesg "" ${NORMAL}
read ENTER
/etc/rc.d/init.d/halt stop
fi
 
# Udev handles uevents itself, so we don't need to have
# the kernel call out to any binary in response to them
echo > /proc/sys/kernel/hotplug
 
# Copy the only static device node that Udev >= 155 doesn't
# handle to /dev
cp -a /lib/udev/devices/null /dev
 
# Start the udev daemon to continually watch for, and act on,
# uevents
/sbin/udevd --daemon
 
# Now traverse /sys in order to "coldplug" devices that have
# already been discovered
/sbin/udevadm trigger --action=add
 
# Now wait for udevd to process the uevents we triggered
/sbin/udevadm settle
evaluate_retval
 
;;
 
*)
echo "Usage ${0} {start}"
exit 1
;;
esac
 
# End $rc_base/init.d/udev
/trunk/hlfs/bootscripts/hlfs/init.d/consolelog
0,0 → 1,61
#!/bin/sh
# Begin $rc_base/init.d/consolelog
 
########################################################################
#
# Description : Set the kernel log level for the console
#
# Authors : Dan Nicholson - dnicholson@linuxfromscratch.org
#
# Version : 00.00
#
# Notes : /proc must be mounted before this can run
#
########################################################################
 
. /etc/sysconfig/rc
. ${rc_functions}
 
# set the default loglevel
LOGLEVEL=7
if [ -r /etc/sysconfig/console ]; then
. /etc/sysconfig/console
fi
 
case "${1}" in
start)
case "$LOGLEVEL" in
[1-8])
boot_mesg "Setting the console log level to ${LOGLEVEL}..."
dmesg -n $LOGLEVEL
evaluate_retval
;;
*)
boot_mesg "Console log level '${LOGLEVEL}' is invalid" ${FAILURE}
echo_failure
;;
esac
;;
status)
# Read the current value if possible
if [ -r /proc/sys/kernel/printk ]; then
read level line < /proc/sys/kernel/printk
else
boot_mesg "Can't read the current console log level" ${FAILURE}
echo_failure
fi
 
# Print the value
if [ -n "$level" ]; then
${ECHO} -e "${INFO}The current console log level" \
"is ${level}${NORMAL}"
fi
;;
 
*)
echo "Usage: ${0} {start|status}"
exit 1
;;
esac
 
# End $rc_base/init.d/consolelog
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: bootscripts/hlfs/init.d/rc
===================================================================
--- bootscripts/hlfs/init.d/rc (nonexistent)
+++ bootscripts/hlfs/init.d/rc (revision 1401)
@@ -0,0 +1,99 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/rc
+#
+# Description : Main Run Level Control Script
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+# This sets a few default terminal options.
+stty sane
+
+# These 3 signals will not cause our script to exit
+trap "" INT QUIT TSTP
+
+[ "${1}" != "" ] && runlevel=${1}
+
+if [ "${runlevel}" = "" ]; then
+ echo "Usage: ${0} <runlevel>" >&2
+ exit 1
+fi
+
+previous=${PREVLEVEL}
+[ "${previous}" = "" ] && previous=N
+
+if [ ! -d ${rc_base}/rc${runlevel}.d ]; then
+ boot_mesg "${rc_base}/rc${runlevel}.d does not exist." ${WARNING}
+ boot_mesg_flush
+ exit 1
+fi
+
+# Attempt to stop all service started by previous runlevel,
+# and killed in this runlevel
+if [ "${previous}" != "N" ]; then
+ for i in $(ls -v ${rc_base}/rc${runlevel}.d/K* 2> /dev/null)
+ do
+ check_script_status
+
+ suffix=${i#$rc_base/rc$runlevel.d/K[0-9][0-9]}
+ prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix
+ sysinit_start=$rc_base/rcsysinit.d/S[0-9][0-9]$suffix
+
+ 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
+ continue
+ fi
+ fi
+ ${i} stop
+ error_value=${?}
+
+ if [ "${error_value}" != "0" ]; then
+ print_error_msg
+ fi
+ done
+fi
+
+#Start all functions in this runlevel
+for i in $( ls -v ${rc_base}/rc${runlevel}.d/S* 2> /dev/null)
+do
+ if [ "${previous}" != "N" ]; then
+ suffix=${i#$rc_base/rc$runlevel.d/S[0-9][0-9]}
+ stop=$rc_base/rc$runlevel.d/K[0-9][0-9]$suffix
+ prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix
+
+ [ -f ${prev_start} ] && [ ! -f ${stop} ] && continue
+ fi
+
+ check_script_status
+
+ case ${runlevel} in
+ 0|6)
+ ${i} stop
+ ;;
+ *)
+ ${i} start
+ ;;
+ esac
+ error_value=${?}
+
+ if [ "${error_value}" != "0" ]; then
+ print_error_msg
+ fi
+done
+
+# End $rc_base/init.d/rc
Index: bootscripts/hlfs/init.d/checkfs
===================================================================
--- bootscripts/hlfs/init.d/checkfs (nonexistent)
+++ bootscripts/hlfs/init.d/checkfs (revision 1401)
@@ -0,0 +1,131 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/checkfs
+#
+# Description : File System Check
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+# A. Luebke - luebke@users.sourceforge.net
+#
+# Version : 00.00
+#
+# Notes :
+#
+# Based on checkfs script from LFS-3.1 and earlier.
+#
+# From man fsck
+# 0 - No errors
+# 1 - File system errors corrected
+# 2 - System should be rebooted
+# 4 - File system errors left uncorrected
+# 8 - Operational error
+# 16 - Usage or syntax error
+# 32 - Fsck canceled by user request
+# 128 - Shared library error
+#
+#########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_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
+ exit 0
+ fi
+
+ boot_mesg "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}
+ read ENTER
+ ${rc_base}/init.d/halt stop
+ fi
+
+ if [ -f /forcefsck ]; then
+ boot_mesg -n "/forcefsck found, forcing file" ${INFO}
+ boot_mesg " system checks as requested."
+ echo_ok
+ options="-f"
+ else
+ options=""
+ fi
+
+ boot_mesg "Checking file systems..."
+ # Note: -a option used to be -p; but this fails e.g.
+ # on fsck.minix
+ fsck ${options} -a -A -C -T
+ error_value=${?}
+
+ if [ "${error_value}" = 0 ]; then
+ echo_ok
+ 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}
+ 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}
+ read ENTER
+ reboot -f
+ fi
+
+ if [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then
+ echo_failure
+ boot_mesg -n "FAILURE:\n\nFile system errors" ${FAILURE}
+ boot_mesg -n " were encountered that could not be"
+ boot_mesg -n " fixed automatically. This system"
+ boot_mesg -n " cannot continue to boot and will"
+ boot_mesg -n " therefore be halted until those"
+ boot_mesg -n " errors are fixed manually by a"
+ boot_mesg -n " System Administrator.\n\nAfter you"
+ boot_mesg -n " press Enter, this system will be"
+ boot_mesg -n " halted and powered off."
+ boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
+ boot_mesg "" ${NORMAL}
+ read ENTER
+ ${rc_base}/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}
+ exit ${error_value}
+ fi
+ ;;
+ *)
+ echo "Usage: ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/checkfs
Index: bootscripts/hlfs/init.d/setclock
===================================================================
--- bootscripts/hlfs/init.d/setclock (nonexistent)
+++ bootscripts/hlfs/init.d/setclock (revision 1401)
@@ -0,0 +1,47 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/setclock
+#
+# Description : Setting Linux Clock
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+. /etc/sysconfig/clock
+
+case "${UTC}" in
+ yes|true|1)
+ CLOCKPARAMS="${CLOCKPARAMS} --utc"
+ ;;
+
+ no|false|0)
+ CLOCKPARAMS="${CLOCKPARAMS} --localtime"
+ ;;
+
+esac
+
+case ${1} in
+ start)
+ boot_mesg "Setting system clock..."
+ hwclock --hctosys ${CLOCKPARAMS} >/dev/null
+ evaluate_retval
+ ;;
+
+ stop)
+ boot_mesg "Setting hardware clock..."
+ hwclock --systohc ${CLOCKPARAMS} >/dev/null
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop}"
+ ;;
+
+esac
Index: bootscripts/hlfs/init.d/modules
===================================================================
--- bootscripts/hlfs/init.d/modules (nonexistent)
+++ bootscripts/hlfs/init.d/modules (revision 1401)
@@ -0,0 +1,72 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/modules
+#
+# Description : Module auto-loading script
+#
+# Authors : Zack Winkles
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+# Assure that the kernel has module support.
+[ -e /proc/ksyms -o -e /proc/modules ] || exit 0
+
+case "${1}" in
+ start)
+
+ # Exit if there's no modules file or there are no
+ # valid entries
+ [ -r /etc/sysconfig/modules ] &&
+ egrep -qv '^($|#)' /etc/sysconfig/modules ||
+ exit 0
+
+ boot_mesg -n "Loading modules:" ${INFO}
+
+ # Only try to load modules if the user has actually given us
+ # some modules to load.
+ while read module args; do
+
+ # Ignore comments and blank lines.
+ case "$module" in
+ ""|"#"*) continue ;;
+ esac
+
+ # Attempt to load the module, making
+ # sure to pass any arguments provided.
+ modprobe ${module} ${args} >/dev/null
+
+ # Print the module name if successful,
+ # otherwise take note.
+ if [ $? -eq 0 ]; then
+ boot_mesg -n " ${module}" ${NORMAL}
+ else
+ failedmod="${failedmod} ${module}"
+ fi
+ done < /etc/sysconfig/modules
+
+ boot_mesg "" ${NORMAL}
+ # Print a message about successfully loaded
+ # modules on the correct line.
+ echo_ok
+
+ # Print a 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
+ fi
+ ;;
+ *)
+ echo "Usage: ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/modules
Index: bootscripts/hlfs/init.d/functions
===================================================================
--- bootscripts/hlfs/init.d/functions (nonexistent)
+++ bootscripts/hlfs/init.d/functions (revision 1401)
@@ -0,0 +1,771 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/functions
+#
+# Description : Run Level Control Functions
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes : With code based on Matthias Benkmann's simpleinit-msb
+# http://winterdrache.de/linux/newboot/index.html
+#
+########################################################################
+
+## Environmental setup
+# Setup default values for environment
+umask 022
+export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+
+# Signal sent to running processes to refresh their configuration
+RELOADSIG="HUP"
+
+# Number of seconds between STOPSIG and FALLBACK when stopping processes
+KILLDELAY="3"
+
+## 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))
+
+## Provide an echo that supports -e and -n
+# If formatting is needed, $ECHO should be used
+case "`echo -e -n test`" in
+ -[en]*)
+ ECHO=/bin/echo
+ ;;
+ *)
+ ECHO=echo
+ ;;
+esac
+
+## 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
+
+STRING_LENGTH="0" # the length of the current message
+
+#*******************************************************************************
+# Function - boot_mesg()
+#
+# Purpose: Sending information from bootup scripts to the console
+#
+# Inputs: $1 is the message
+# $2 is the colorcode for the console
+#
+# Outputs: Standard Output
+#
+# Dependencies: - sed for parsing strings.
+# - grep for counting string length.
+#
+# Todo:
+#*******************************************************************************
+boot_mesg()
+{
+ local ECHOPARM=""
+
+ while true
+ do
+ case "${1}" in
+ -n)
+ ECHOPARM=" -n "
+ shift 1
+ ;;
+ -*)
+ echo "Unknown Option: ${1}"
+ return 1
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+
+ ## Figure out the length of what is to be printed to be used
+ ## for warning messages.
+ STRING_LENGTH=$((${#1} + 1))
+
+ # Print the message to the screen
+ ${ECHO} ${ECHOPARM} -e "${2}${1}"
+
+}
+
+boot_mesg_flush()
+{
+ # Reset STRING_LENGTH for next message
+ STRING_LENGTH="0"
+}
+
+boot_log()
+{
+ # Left in for backwards compatibility
+ :
+}
+
+echo_ok()
+{
+ ${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${SUCCESS} OK ${BRACKET}]"
+ ${ECHO} -e "${NORMAL}"
+ boot_mesg_flush
+}
+
+echo_failure()
+{
+ ${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]"
+ ${ECHO} -e "${NORMAL}"
+ boot_mesg_flush
+}
+
+echo_warning()
+{
+ ${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]"
+ ${ECHO} -e "${NORMAL}"
+ boot_mesg_flush
+}
+
+print_error_msg()
+{
+ echo_failure
+ # $i is inherited by the rc script
+ 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}
+ read ENTER
+}
+
+check_script_status()
+{
+ # $i is inherited by the rc script
+ if [ ! -f ${i} ]; then
+ boot_mesg "${i} is not a valid symlink." ${WARNING}
+ echo_warning
+ continue
+ fi
+
+ if [ ! -x ${i} ]; then
+ boot_mesg "${i} is not executable, skipping." ${WARNING}
+ echo_warning
+ continue
+ fi
+}
+
+evaluate_retval()
+{
+ error_value="${?}"
+
+ if [ ${error_value} = 0 ]; then
+ echo_ok
+ else
+ echo_failure
+ fi
+
+ # This prevents the 'An Unexpected Error Has Occurred' from trivial
+ # errors.
+ return 0
+}
+
+print_status()
+{
+ if [ "${#}" = "0" ]; then
+ echo "Usage: ${0} {success|warning|failure}"
+ return 1
+ fi
+
+ case "${1}" in
+
+ success)
+ echo_ok
+ ;;
+
+ warning)
+ # Leave this extra case in because old scripts
+ # may call it this way.
+ case "${2}" in
+ running)
+ ${ECHO} -e -n "${CURS_UP}"
+ ${ECHO} -e -n "\\033[${STRING_LENGTH}G "
+ boot_mesg "Already running." ${WARNING}
+ echo_warning
+ ;;
+ not_running)
+ ${ECHO} -e -n "${CURS_UP}"
+ ${ECHO} -e -n "\\033[${STRING_LENGTH}G "
+ boot_mesg "Not running." ${WARNING}
+ echo_warning
+ ;;
+ not_available)
+ ${ECHO} -e -n "${CURS_UP}"
+ ${ECHO} -e -n "\\033[${STRING_LENGTH}G "
+ boot_mesg "Not available." ${WARNING}
+ echo_warning
+ ;;
+ *)
+ # This is how it is supposed to
+ # be called
+ echo_warning
+ ;;
+ esac
+ ;;
+
+ failure)
+ echo_failure
+ ;;
+
+ esac
+
+}
+
+reloadproc()
+{
+ local pidfile=""
+ local failure=0
+
+ while true
+ do
+ case "${1}" in
+ -p)
+ pidfile="${2}"
+ shift 2
+ ;;
+ -*)
+ log_failure_msg "Unknown Option: ${1}"
+ return 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+
+ if [ "${#}" -lt "1" ]; then
+ log_failure_msg "Usage: reloadproc [-p pidfile] pathname"
+ return 2
+ fi
+
+ # This will ensure compatibility with previous LFS Bootscripts
+ if [ -n "${PIDFILE}" ]; then
+ pidfile="${PIDFILE}"
+ fi
+
+ # Is the process running?
+ if [ -z "${pidfile}" ]; then
+ pidofproc -s "${1}"
+ else
+ pidofproc -s -p "${pidfile}" "${1}"
+ fi
+
+ # Warn about stale pid file
+ if [ "$?" = 1 ]; then
+ boot_mesg -n "Removing stale pid file: ${pidfile}. " ${WARNING}
+ rm -f "${pidfile}"
+ fi
+
+ if [ -n "${pidlist}" ]; then
+ for pid in ${pidlist}
+ do
+ kill -"${RELOADSIG}" "${pid}" || failure="1"
+ done
+
+ (exit ${failure})
+ evaluate_retval
+
+ else
+ boot_mesg "Process ${1} not running." ${WARNING}
+ echo_warning
+ fi
+}
+
+statusproc()
+{
+ local pidfile=""
+ local base=""
+ local ret=""
+
+ while true
+ do
+ case "${1}" in
+ -p)
+ pidfile="${2}"
+ shift 2
+ ;;
+ -*)
+ log_failure_msg "Unknown Option: ${1}"
+ return 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+
+ if [ "${#}" != "1" ]; then
+ shift 1
+ log_failure_msg "Usage: statusproc [-p pidfile] pathname"
+ return 2
+ fi
+
+ # Get the process basename
+ base="${1##*/}"
+
+ # This will ensure compatibility with previous LFS Bootscripts
+ if [ -n "${PIDFILE}" ]; then
+ pidfile="${PIDFILE}"
+ fi
+
+ # Is the process running?
+ if [ -z "${pidfile}" ]; then
+ pidofproc -s "${1}"
+ else
+ pidofproc -s -p "${pidfile}" "${1}"
+ fi
+
+ # Store the return status
+ ret=$?
+
+ if [ -n "${pidlist}" ]; then
+ ${ECHO} -e "${INFO}${base} is running with Process"\
+ "ID(s) ${pidlist}.${NORMAL}"
+ else
+ if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then
+ ${ECHO} -e "${WARNING}${1} is not running but"\
+ "/var/run/${base}.pid exists.${NORMAL}"
+ else
+ if [ -n "${pidfile}" -a -e "${pidfile}" ]; then
+ ${ECHO} -e "${WARNING}${1} is not running"\
+ "but ${pidfile} exists.${NORMAL}"
+ else
+ ${ECHO} -e "${INFO}${1} is not running.${NORMAL}"
+ fi
+ fi
+ fi
+
+ # Return the status from pidofproc
+ return $ret
+}
+
+# The below functions are documented in the LSB-generic 2.1.0
+
+#*******************************************************************************
+# Function - pidofproc [-s] [-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
+#
+# Outputs: return 0 - Success, pid's in stdout
+# return 1 - Program is dead, pidfile exists
+# return 2 - Invalid or excessive number of arguments,
+# warning in stdout
+# return 3 - Program is not running
+#
+# Dependencies: pidof, echo, head
+#
+# Todo: Remove dependency on head
+# This replaces getpids
+# Test changes to pidof
+#
+#*******************************************************************************
+pidofproc()
+{
+ local pidfile=""
+ local lpids=""
+ local silent=""
+ pidlist=""
+ while true
+ do
+ case "${1}" in
+ -p)
+ pidfile="${2}"
+ shift 2
+ ;;
+
+ -s)
+ # Added for legacy opperation of getpids
+ # eliminates several '> /dev/null'
+ silent="1"
+ shift 1
+ ;;
+ -*)
+ log_failure_msg "Unknown Option: ${1}"
+ return 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+
+ if [ "${#}" != "1" ]; then
+ shift 1
+ log_failure_msg "Usage: pidofproc [-s] [-p pidfile] pathname"
+ return 2
+ fi
+
+ if [ -n "${pidfile}" ]; then
+ if [ ! -r "${pidfile}" ]; then
+ return 3 # Program is not running
+ fi
+
+ lpids=`head -n 1 ${pidfile}`
+ for pid in ${lpids}
+ do
+ if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]; then
+ kill -0 "${pid}" 2>/dev/null &&
+ pidlist="${pidlist} ${pid}"
+ fi
+
+ if [ "${silent}" != "1" ]; then
+ echo "${pidlist}"
+ fi
+
+ test -z "${pidlist}" &&
+ # Program is dead, pidfile exists
+ return 1
+ # else
+ return 0
+ done
+
+ else
+ pidlist=`pidof -o $$ -o $PPID -x "$1"`
+ if [ "${silent}" != "1" ]; then
+ echo "${pidlist}"
+ fi
+
+ # Get provide correct running status
+ if [ -n "${pidlist}" ]; then
+ return 0
+ else
+ return 3
+ fi
+
+ fi
+
+ if [ "$?" != "0" ]; then
+ return 3 # Program is not running
+ fi
+}
+
+#*******************************************************************************
+# Function - loadproc [-f] [-n nicelevel] [-p pidfile] pathname [args]
+#
+# Purpose: This runs the specified program as a daemon
+#
+# Inputs: -f, run the program even if it is already running
+# -n nicelevel, specifies a nice level. See nice(1).
+# -p pidfile, uses the specified pidfile
+# pathname, pathname to the specified program
+# args, arguments to pass to specified program
+#
+# Outputs: return 0 - Success
+# return 2 - Invalid of excessive number of arguments,
+# warning in stdout
+# return 4 - Program or service status is unknown
+#
+# Dependencies: nice, rm
+#
+# Todo: LSB says this should be called start_daemon
+# LSB does not say that it should call evaluate_retval
+# It checks for PIDFILE, which is deprecated.
+# Will be removed after BLFS 6.0
+# loadproc returns 0 if program is already running, not LSB compliant
+#
+#*******************************************************************************
+loadproc()
+{
+ local pidfile=""
+ local forcestart=""
+ local nicelevel="10"
+
+# This will ensure compatibility with previous LFS Bootscripts
+ if [ -n "${PIDFILE}" ]; then
+ pidfile="${PIDFILE}"
+ fi
+
+ while true
+ do
+ case "${1}" in
+ -f)
+ forcestart="1"
+ shift 1
+ ;;
+ -n)
+ nicelevel="${2}"
+ shift 2
+ ;;
+ -p)
+ pidfile="${2}"
+ shift 2
+ ;;
+ -*)
+ log_failure_msg "Unknown Option: ${1}"
+ return 2 #invalid or excess argument(s)
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+
+ if [ "${#}" = "0" ]; then
+ log_failure_msg "Usage: loadproc [-f] [-n nicelevel] [-p pidfile] pathname [args]"
+ return 2 #invalid or excess argument(s)
+ fi
+
+ if [ -z "${forcestart}" ]; then
+ if [ -z "${pidfile}" ]; then
+ pidofproc -s "${1}"
+ else
+ pidofproc -s -p "${pidfile}" "${1}"
+ fi
+
+ case "${?}" in
+ 0)
+ log_warning_msg "Unable to continue: ${1} is running"
+ return 0 # 4
+ ;;
+ 1)
+ boot_mesg "Removing stale pid file: ${pidfile}" ${WARNING}
+ rm -f "${pidfile}"
+ ;;
+ 3)
+ ;;
+ *)
+ log_failure_msg "Unknown error code from pidofproc: ${?}"
+ return 4
+ ;;
+ esac
+ fi
+
+ nice -n "${nicelevel}" "${@}"
+ evaluate_retval # This is "Probably" not LSB compliant,
+# but required to be compatible with older bootscripts
+ return 0
+}
+
+#*******************************************************************************
+# Function - killproc [-p pidfile] pathname [signal]
+#
+# Purpose:
+#
+# Inputs: -p pidfile, uses the specified pidfile
+# pathname, pathname to the specified program
+# signal, send this signal to pathname
+#
+# Outputs: return 0 - Success
+# return 2 - Invalid of excessive number of arguments,
+# warning in stdout
+# return 4 - Unknown Status
+#
+# Dependencies: kill, rm
+#
+# Todo: LSB does not say that it should call evaluate_retval
+# It checks for PIDFILE, which is deprecated.
+# Will be removed after BLFS 6.0
+#
+#*******************************************************************************
+killproc()
+{
+ local pidfile=""
+ local killsig=TERM # default signal is SIGTERM
+ pidlist=""
+
+ # This will ensure compatibility with previous LFS Bootscripts
+ if [ -n "${PIDFILE}" ]; then
+ pidfile="${PIDFILE}"
+ fi
+
+ while true
+ do
+ case "${1}" in
+ -p)
+ pidfile="${2}"
+ shift 2
+ ;;
+ -*)
+ log_failure_msg "Unknown Option: ${1}"
+ return 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+
+ if [ "${#}" = "2" ]; then
+ killsig="${2}"
+ elif [ "${#}" != "1" ]; then
+ shift 2
+ log_failure_msg "Usage: killproc [-p pidfile] pathname [signal]"
+ return 2
+ fi
+
+ # Is the process running?
+ if [ -z "${pidfile}" ]; then
+ pidofproc -s "${1}"
+ else
+ pidofproc -s -p "${pidfile}" "${1}"
+ fi
+
+ # Remove stale pidfile
+ if [ "$?" = 1 ]; then
+ boot_mesg "Removing stale pid file: ${pidfile}." ${WARNING}
+ rm -f "${pidfile}"
+ fi
+
+ # If running, send the signal
+ if [ -n "${pidlist}" ]; then
+ for pid in ${pidlist}
+ do
+ kill -${killsig} ${pid} 2>/dev/null
+
+ # Wait up to 3 seconds, for ${pid} to terminate
+ case "${killsig}" in
+ TERM|SIGTERM|KILL|SIGKILL)
+ # sleep in 1/10ths of seconds and
+ # multiply KILLDELAY by 10
+ local dtime="${KILLDELAY}0"
+ while [ "${dtime}" != "0" ]
+ do
+ kill -0 ${pid} 2>/dev/null || break
+ sleep 0.1
+ dtime=$(( ${dtime} - 1))
+ done
+ # If ${pid} is still running, kill it
+ kill -0 ${pid} 2>/dev/null && kill -KILL ${pid} 2>/dev/null
+ ;;
+ esac
+ done
+
+ # Check if the process is still running if we tried to stop it
+ case "${killsig}" in
+ TERM|SIGTERM|KILL|SIGKILL)
+ if [ -z "${pidfile}" ]; then
+ pidofproc -s "${1}"
+ else
+ pidofproc -s -p "${pidfile}" "${1}"
+ fi
+
+ # Program was terminated
+ if [ "$?" != "0" ]; then
+ # Remove the pidfile if necessary
+ if [ -f "${pidfile}" ]; then
+ rm -f "${pidfile}"
+ fi
+ echo_ok
+ return 0
+ else # Program is still running
+ echo_failure
+ return 4 # Unknown Status
+ fi
+ ;;
+ *)
+ # Just see if the kill returned successfully
+ evaluate_retval
+ ;;
+ esac
+ else # process not running
+ print_status warning not_running
+ fi
+}
+
+
+#*******************************************************************************
+# Function - log_success_msg "message"
+#
+# Purpose: Print a success message
+#
+# Inputs: $@ - Message
+#
+# Outputs: Text output to screen
+#
+# Dependencies: echo
+#
+# Todo: logging
+#
+#*******************************************************************************
+log_success_msg()
+{
+ ${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
+ ${ECHO} -e "${SET_COL}""${BRACKET}""[""${SUCCESS}"" OK ""${BRACKET}""]""${NORMAL}"
+ return 0
+}
+
+#*******************************************************************************
+# Function - log_failure_msg "message"
+#
+# Purpose: Print a failure message
+#
+# Inputs: $@ - Message
+#
+# Outputs: Text output to screen
+#
+# Dependencies: echo
+#
+# Todo: logging
+#
+#*******************************************************************************
+log_failure_msg() {
+ ${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
+ ${ECHO} -e "${SET_COL}""${BRACKET}""[""${FAILURE}"" FAIL ""${BRACKET}""]""${NORMAL}"
+ return 0
+}
+
+#*******************************************************************************
+# Function - log_warning_msg "message"
+#
+# Purpose: print a warning message
+#
+# Inputs: $@ - Message
+#
+# Outputs: Text output to screen
+#
+# Dependencies: echo
+#
+# Todo: logging
+#
+#*******************************************************************************
+log_warning_msg() {
+ ${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
+ ${ECHO} -e "${SET_COL}""${BRACKET}""[""${WARNING}"" WARN ""${BRACKET}""]""${NORMAL}"
+ return 0
+}
+
+# End $rc_base/init.d/functions
Index: bootscripts/hlfs/init.d/sendsignals
===================================================================
--- bootscripts/hlfs/init.d/sendsignals (nonexistent)
+++ bootscripts/hlfs/init.d/sendsignals (revision 1401)
@@ -0,0 +1,52 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/sendsignals
+#
+# Description : Sendsignals Script
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ stop)
+ boot_mesg "Sending all processes the TERM signal..."
+ killall5 -15
+ error_value=${?}
+
+ sleep ${KILLDELAY}
+
+ if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
+ echo_ok
+ else
+ echo_failure
+ fi
+
+ boot_mesg "Sending all processes the KILL signal..."
+ killall5 -9
+ error_value=${?}
+
+ sleep ${KILLDELAY}
+
+ if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
+ echo_ok
+ else
+ echo_failure
+ fi
+ ;;
+
+ *)
+ echo "Usage: ${0} {stop}"
+ exit 1
+ ;;
+
+esac
+
+# End $rc_base/init.d/sendsignals
Index: bootscripts/hlfs/init.d/swap
===================================================================
--- bootscripts/hlfs/init.d/swap (nonexistent)
+++ bootscripts/hlfs/init.d/swap (revision 1401)
@@ -0,0 +1,50 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/swap
+#
+# Description : Swap Control Script
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ boot_mesg "Activating all swap files/partitions..."
+ swapon -a
+ evaluate_retval
+ ;;
+
+ stop)
+ boot_mesg "Deactivating all swap files/partitions..."
+ swapoff -a
+ evaluate_retval
+ ;;
+
+ restart)
+ ${0} stop
+ sleep 1
+ ${0} start
+ ;;
+
+ status)
+ boot_mesg "Retrieving swap status." ${INFO}
+ echo_ok
+ echo
+ swapon -s
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/swap
Index: bootscripts/hlfs/init.d/mountkernfs
===================================================================
--- bootscripts/hlfs/init.d/mountkernfs (nonexistent)
+++ bootscripts/hlfs/init.d/mountkernfs (revision 1401)
@@ -0,0 +1,44 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/mountkernfs
+#
+# Description : Mount proc and sysfs
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ boot_mesg -n "Mounting kernel-based file systems:" ${INFO}
+
+ if ! mountpoint /proc >/dev/null; then
+ boot_mesg -n " /proc" ${NORMAL}
+ mount -n /proc || failed=1
+ fi
+
+ if ! mountpoint /sys >/dev/null; then
+ boot_mesg -n " /sys" ${NORMAL}
+ mount -n /sys || failed=1
+ fi
+
+ boot_mesg "" ${NORMAL}
+
+ (exit ${failed})
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage: ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/mountkernfs
Index: bootscripts/hlfs/init.d/cleanfs
===================================================================
--- bootscripts/hlfs/init.d/cleanfs (nonexistent)
+++ bootscripts/hlfs/init.d/cleanfs (revision 1401)
@@ -0,0 +1,110 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/cleanfs
+#
+# Description : Clean file system
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+# Function to create files/directory on boot.
+create_files() {
+ # Read in the configuration file.
+ 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 ;;
+ 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
+ exec 0>&9 9>&-
+}
+
+case "${1}" in
+ start)
+ boot_mesg -n "Cleaning file systems:" ${INFO}
+
+ boot_mesg -n " /tmp" ${NORMAL}
+ cd /tmp &&
+ find . -xdev -mindepth 1 ! -name lost+found \
+ -delete || failed=1
+
+ boot_mesg -n " /var/lock" ${NORMAL}
+ cd /var/lock &&
+ find . -type f -exec rm -f {} \; || failed=1
+
+ boot_mesg " /var/run" ${NORMAL}
+ cd /var/run &&
+ find . ! -type d ! -name utmp \
+ -exec rm -f {} \; || failed=1
+ > /var/run/utmp
+ if grep -q '^utmp:' /etc/group ; then
+ chmod 664 /var/run/utmp
+ chgrp utmp /var/run/utmp
+ fi
+
+ (exit ${failed})
+ evaluate_retval
+
+ if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; then
+ boot_mesg "Creating files and directories..."
+ create_files
+ evaluate_retval
+ fi
+ ;;
+ *)
+ echo "Usage: ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/cleanfs
Index: bootscripts/hlfs/init.d/template
===================================================================
--- bootscripts/hlfs/init.d/template (nonexistent)
+++ bootscripts/hlfs/init.d/template (revision 1401)
@@ -0,0 +1,50 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/
+#
+# Description :
+#
+# Authors :
+#
+# Version : 00.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ boot_mesg "Starting..."
+ loadproc
+ ;;
+
+ stop)
+ boot_mesg "Stopping..."
+ killproc
+ ;;
+
+ reload)
+ boot_mesg "Reloading..."
+ reloadproc
+ ;;
+
+ restart)
+ ${0} stop
+ sleep 1
+ ${0} start
+ ;;
+
+ status)
+ statusproc
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|reload|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/
Index: bootscripts/Makefile
===================================================================
--- bootscripts/Makefile (revision 1400)
+++ bootscripts/Makefile (revision 1401)
@@ -1,132 +1,117 @@
-ETCDIR=/etc
-EXTDIR=${DESTDIR}${ETCDIR}
-MODE=754
-DIRMODE=755
-CONFMODE=644
+BASEDIR = ~/hlfs-book
+DUMPDIR = ~/hlfs-commands
+RENDERTMP = $(HOME)/tmp
+CHUNK_QUIET = 1
+ROOT_ID =
+PDF_OUTPUT = HLFS-BOOK.pdf
+NOCHUNKS_OUTPUT = HLFS-BOOK.html
-all: install
+ifdef V
+ Q =
+else
+ Q = @
+endif
-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
+hlfs: maketar validxml profile-html
+ @echo "Generating chunked XHTML files..."
+ $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
+ -stringparam rootid "$(ROOT_ID)" -stringparam base.dir $(BASEDIR)/ \
+ stylesheets/lfs-chunked.xsl $(RENDERTMP)/hlfs-html.xml
-create-service-dir:
- install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
+ @echo "Copying CSS code and images..."
+ $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
+ mkdir -p $(BASEDIR)/stylesheets; \
+ fi;
+ $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
+ $(Q)if [ ! -e $(BASEDIR)/images ]; then \
+ mkdir -p $(BASEDIR)/images; \
+ fi;
+ $(Q)cp images/*.png $(BASEDIR)/images
+ $(Q)cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html
+ $(Q)cd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html
-install: create-dirs create-service-dir
- 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 ${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 ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/modules ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/mountkernfs ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/network ${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/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/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/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs
- ln -sf ../init.d/consolelog ${EXTDIR}/rc.d/rcsysinit.d/S02consolelog
- ln -sf ../init.d/modules ${EXTDIR}/rc.d/rcsysinit.d/S05modules
- ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev
- ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcsysinit.d/S20swap
- ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
- ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
- ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
- ln -sf ../init.d/udev_retry ${EXTDIR}/rc.d/rcsysinit.d/S50udev_retry
- ln -sf ../init.d/console ${EXTDIR}/rc.d/rcsysinit.d/S70console
- ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
- ln -sf ../init.d/sysctl ${EXTDIR}/rc.d/rcsysinit.d/S90sysctl
- if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/; fi
- if [ ! -f ${EXTDIR}/sysconfig/modules ]; then install -m ${CONFMODE} lfs/sysconfig/modules ${EXTDIR}/sysconfig/; fi
- if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; fi
- install -m ${MODE} lfs/sysconfig/network-devices/ifup ${EXTDIR}/sysconfig/network-devices/
- install -m ${MODE} lfs/sysconfig/network-devices/ifdown ${EXTDIR}/sysconfig/network-devices/
- install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static ${EXTDIR}/sysconfig/network-devices/services/
- install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static-route ${EXTDIR}/sysconfig/network-devices/services/
+ @echo "Running Tidy and obfuscate.sh..."
+ $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
+ tidy -config tidy.conf $$filename; \
+ true; \
+ /bin/bash obfuscate.sh $$filename; \
+ sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
+ done;
-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
+ $(Q)$(MAKE) wget-list
-install-lsb-compliant:
- make -C contrib/lsb
+pdf: validxml
+ @echo "Generating profiled XML for PDF..."
+ $(Q)xsltproc --nonet --stringparam profile.condition pdf \
+ --output $(RENDERTMP)/hlfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
+ $(RENDERTMP)/hlfs-full.xml
-install-service-mtu: create-service-dir
- install -m ${MODE} contrib/sysconfig/network-devices/services/mtu ${EXTDIR}/sysconfig/network-devices/services
+ @echo "Generating FO file..."
+ $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
+ --output $(RENDERTMP)/hlfs-pdf.fo stylesheets/lfs-pdf.xsl \
+ $(RENDERTMP)/hlfs-pdf.xml
+ $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/hlfs-pdf.fo
+ $(Q)bash pdf-fixups.sh $(RENDERTMP)/hlfs-pdf.fo
-minimal: create-dirs create-service-dir
- 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 ${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/mountkernfs ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/rc ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/setclock ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/udev ${EXTDIR}/rc.d/init.d/
- ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
- ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs
- ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S80swap
- ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt
- ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
- ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs
- ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap
- ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot
- ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs
- 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
+ @echo "Generating PDF file..."
+ $(Q)if [ ! -e $(BASEDIR) ]; then \
+ mkdir -p $(BASEDIR); \
+ fi;
+ $(Q)fop $(RENDERTMP)/hlfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
-.PHONY: all create-dirs create-service-dir \
- install install-service-mtu
+nochunks: maketar validxml profile-html
+ @echo "Generating non chunked XHTML file..."
+ $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
+ --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
+ stylesheets/lfs-nochunks.xsl $(RENDERTMP)/hlfs-html.xml
+ @echo "Running Tidy..."
+ $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
+ @echo "Running obfuscate.sh..."
+ $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
+ $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" \
+ $(BASEDIR)/$(NOCHUNKS_OUTPUT)
+
+tmpdir:
+ @echo "Creating and cleaning $(RENDERTMP)"
+ $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
+ $(Q)rm -f $(RENDERTMP)/hlfs-{full,html,pdf}.xml
+ $(Q)rm -f $(RENDERTMP)/hlfs-pdf.fo
+
+validxml: tmpdir
+ @echo "Processing bootscripts..."
+ $(Q)bash process-scripts.sh
+ @echo "Validating the book..."
+ $(Q)xmllint --nonet --noent --xinclude --postvalid \
+ -o $(RENDERTMP)/hlfs-full.xml index.xml
+ $(Q)rm -f appendices/*.script
+ $(Q)./aux-file-data.sh $(RENDERTMP)/hlfs-full.xml
+
+maketar:
+ @echo "Making tarballs..."
+ $(Q)sh make-aux-files.sh
+
+profile-html: validxml
+ @echo "Generating profiled XML for XHTML..."
+ $(Q)xsltproc --nonet --stringparam profile.condition html \
+ --output $(RENDERTMP)/hlfs-html.xml stylesheets/lfs-xsl/profile.xsl \
+ $(RENDERTMP)/hlfs-full.xml
+
+wget-list:
+ @echo "Generating wget list..."
+ $(Q)mkdir -p $(BASEDIR)
+ $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
+ stylesheets/wget-list.xsl chapter03/chapter03.xml
+
+dump-commands: validxml
+ @echo "Dumping book commands..."
+ $(Q)xsltproc --output $(DUMPDIR)/ \
+ stylesheets/dump-commands.xsl $(RENDERTMP)/hlfs-full.xml
+
+validate: maketar validxml
+ @echo "Validation complete."
+
+all: hlfs nochunks pdf dump-commands
+
+.PHONY : all dump-commands hlfs nochunks pdf profile-html tmpdir validate \
+ validxml wget-list maketar
/trunk/hlfs/udev-config-20100128.tar.bz2
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/hlfs/hlfs-bootscripts-20110816.tar.bz2
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/hlfs/hlfs-bootscripts-20110816.tar.bz2
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: chapter01/whatsnew.xml
===================================================================
--- chapter01/whatsnew.xml (revision 1400)
+++ chapter01/whatsnew.xml (revision 1401)
@@ -113,7 +113,7 @@
<para>Less &less-version;</para>
</listitem>-->
<listitem>
- <para>LFS-Bootscripts &lfs-bootscripts-version;</para>
+ <para>HLFS-Bootscripts &hlfs-bootscripts-version;</para>
</listitem>
<listitem>
<para>Libtool &libtool-version;</para>
Index: chapter01/changelog.xml
===================================================================
--- chapter01/changelog.xml (revision 1400)
+++ chapter01/changelog.xml (revision 1401)
@@ -38,6 +38,23 @@
-->
<listitem>
+ <para>16-08-2011</para>
+ <itemizedlist>
+ <listitem>
+ <para>[robert] - Remplacement de lfs-bootscripts par hlfs-bootscripts.
+ Pas encore de réel changement.</para>
+ </listitem>
+ <listitem>
+ <para>[robert] - Ajout du script de démarrage random à hlfs-bootscripts,
+ issu de BLFS.</para>
+ </listitem>
+ <listitem>
+ <para>[robert] - Ajout d'iptables au chapitre 6.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>14-08-2011</para>
<itemizedlist>
<listitem>
/trunk/hlfs/chapter03/packages.xml
257,6 → 257,15
<para>Somme de contrôle MD5&nbsp;: <literal>&gzip-md5;</literal></para>
</listitem>
</varlistentry>
<varlistentry>
<term>HLFS-Bootscripts (&hlfs-bootscripts-version;) - <token>&hlfs-bootscripts-size;</token>&nbsp;:</term>
<listitem>
<para>Page d'accueil&nbsp;: <ulink url="&hlfs-bootscripts-home;"/></para>
<para>Téléchargement&nbsp;: <ulink url="&hlfs-bootscripts-url;"/></para>
<para>Somme de contrôle MD5&nbsp;: <literal>&hlfs-bootscripts-md5;</literal></para>
</listitem>
</varlistentry>
 
<varlistentry>
<term>Iana-Etc (&iana-etc-version;) - <token>&iana-etc-size;</token>:</term>
286,6 → 295,15
</varlistentry>
 
<varlistentry>
<term>Iptables (&iptables-version;) - <token>&iptables-size;</token>&nbsp;:</term>
<listitem>
<para>Page d'accueil&nbsp;: <ulink url="&iptables-home;"/></para>
<para>Téléchargement&nbsp;: <ulink url="&iptables-url;"/></para>
<para>Somme de contrôle MD5&nbsp;: <literal>&iptables-md5;</literal></para>
</listitem>
</varlistentry>
 
<varlistentry>
<term>Kbd (&kbd-version;) - <token>&kbd-size;</token>:</term>
<listitem>
<para>Page d'accueil&nbsp;: <ulink url="&kbd-home;"/></para>
304,15 → 322,6
</varlistentry>
 
<varlistentry>
<term>LFS-Bootscripts (&lfs-bootscripts-version;) - <token>&lfs-bootscripts-size;</token>:</term>
<listitem>
<para>Page d'accueil&nbsp;: <ulink url="&lfs-bootscripts-home;"/></para>
<para>Téléchargement&nbsp;: <ulink url="&lfs-bootscripts-url;"/></para>
<para>Somme de contrôle MD5&nbsp;: <literal>&lfs-bootscripts-md5;</literal></para>
</listitem>
</varlistentry>
 
<varlistentry>
<term>Libcap2 (&libcap2-version;) - <token>&libcap2-size;</token>&nbsp;:</term>
<listitem>
<para>Page d'accueil&nbsp;: <ulink url="&libcap2-home;"/></para>
/trunk/hlfs/chapter06/acl.xml
97,9 → 97,13
 
<segmentedlist>
<segtitle>Programme installé</segtitle>
<segtitle>Bibliothèques installées</segtitle>
<segtitle>Répertoires installés</segtitle>
 
<seglistitem>
<seg>acl</seg>
<seg>libacl.{a,so}</seg>
<seg>/usr/share/doc/acl-&acl-version;</seg>
</seglistitem>
</segmentedlist>
 
/trunk/hlfs/chapter06/chapter06.xml
46,6 → 46,7
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iptables.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>
/trunk/hlfs/chapter06/iptables.xml
0,0 → 1,152
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
 
<sect1 id="ch-system-iptables" role="wrap">
<?dbhtml filename="iptables.html"?>
 
<sect1info condition="script">
<productname>iptables</productname>
<productnumber>&iptables-version;</productnumber>
<address>&iptables-url;</address>
</sect1info>
 
<title>Iptables-&iptables-version;</title>
 
<indexterm zone="ch-system-iptables">
<primary sortas="a-Iptables">Attr</primary>
</indexterm>
 
<sect2 role="package">
<title/>
 
<para>Le paquet iptables contient des outils pour administrer un pare-feu.</para>
 
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
 
<seglistitem>
<seg>&iptables-ch6-sbu;</seg>
<seg>&iptables-ch6-du;</seg>
</seglistitem>
</segmentedlist>
 
</sect2>
 
<sect2 role="installation">
<title>Installation d'Iptables</title>
 
<para>Configurez Iptables avec la commande suivante&nbsp;:</para>
 
<screen><userinput remap="configure">./configure --prefix=/usr \
--bindir=/sbin --sbindir=/sbin --sbindir=/sbin \
--libdir=/lib --libexecdir=/lib \
--with-pkgconfigdir=/usr/lib/pkgconfig</userinput></screen>
 
<para>Construisez le paquet&nbsp;:</para>
 
<screen><userinput remap="make">make</userinput></screen>
 
<para>Ce paquet n'est pas fourni avec une suite de tests.</para>
 
<para>Installez le paquet&nbsp;:</para>
 
<screen><userinput remap="install">make install</userinput></screen>
 
</sect2>
 
 
<sect2 id="contents-iptables" role="content">
<title>Contenu d'Iptables</title>
 
<segmentedlist>
<segtitle>Programme installé</segtitle>
<segtitle>Bibliothèques installées</segtitle>
<segtitle>Répertoires installés</segtitle>
 
<seglistitem>
<seg>iptables, iptables-restore, iptables-save, iptables-xml,
iptables-multi, ip6tables, ip6tables-restore, ip6tables-save et ip6tables-multii</seg>
<seg>libip4tc.so, libip6tc.so, libiptc.so, libxtables.so et numerous modules in /lib/xtables/</seg>
<seg>/lib/xtables/xtables et /usr/include/libiptc</seg>
</seglistitem>
</segmentedlist>
 
<variablelist>
<bridgehead renderas="sect3">Descriptions courtes</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
 
<varlistentry id="iptables">
<term><command>iptables</command></term>
<listitem>
<para>est utilisé pour paramétrer, maintenir et examiner les tables
de règles de filtrage de paquets IP dans le noyau Linux. C'est un lien
symbolique vers iptables-multi</para>
<indexterm zone="ch-system-iptables iptables">
<primary sortas="b-iptables">attr</primary>
</indexterm>
</listitem>
</varlistentry>
 
<varlistentry id="iptables-restore">
<term><command>iptables-restore</command></term>
<listitem>
<para>est utilisé pour restaurer les tables d'IP à partir de données
spécifiées sur la STDIN. Utilisez la redirection E/S que fournit votre
shell pour lire à partir d'un fichier. C'est un lien symbolique
vers iptables-multi</para>
<indexterm zone="ch-system-iptables iptables-restore">
<primary sortas="b-iptables-restore">iptables-restore</primary>
</indexterm>
</listitem>
</varlistentry>
 
<varlistentry id="iptables-save">
<term><command>iptables-save</command></term>
<listitem>
<para>est utilisé pour transformer le contenu d'une table IP en
un format facilement analysable sur STDOUT. Utilisez la redirection
E/S que fournit votre shell pour écrire vers un fichier. C'est un
lien symbolique vers iptables-multi</para>
<indexterm zone="ch-system-iptables iptables-save">
<primary sortas="b-iptables-save">iptables-save</primary>
</indexterm>
</listitem>
</varlistentry>
 
<varlistentry id="iptables-xml">
<term><command>iptables-xml</command></term>
<listitem>
<para>est utilisé pour convertir la sortie
d'<command>iptables-save</command> en format XML. L'utilisation de
la feuille de style iptables.xslt couvre le retour XML en format
<command>iptables-restore</command>. C'est un lien symbolique vers
iptables-multi</para>
<indexterm zone="ch-system-iptables iptables-xml">
<primary sortas="b-iptables-xml">iptables-xml</primary>
</indexterm>
</listitem>
</varlistentry>
 
<varlistentry id="ip6tables">
<term><command>ip6tables*</command></term>
<listitem>
<para>sont un ensemble de commandes pour IPV6 qui fait la même
chose que les commandes iptables ci-dessus. Toutes ces commandes
sont des liens symboliques vers ip6tables-multi</para>
<indexterm zone="ch-system-iptables ip6tables">
<primary sortas="b-ip6tables">ip6tables*</primary>
</indexterm>
</listitem>
</varlistentry>
 
</variablelist>
 
</sect2>
 
</sect1>
/trunk/hlfs/chapter06/attr.xml
98,9 → 98,14
 
<segmentedlist>
<segtitle>Programme installé</segtitle>
<segtitle>Bibliothèques installées</segtitle>
<segtitle>Répertoires installés</segtitle>
 
<seglistitem>
<seg>attr</seg>
<seg>attr, getfattr</seg>
<seg>libattr.{a,so}</seg>
<seg>/usr/share/doc/attr-&attr-version;</seg>
 
</seglistitem>
</segmentedlist>
 
/trunk/hlfs/chapter07/bootscripts.xml
9,12 → 9,12
<?dbhtml filename="bootscripts.html"?>
 
<sect1info condition="script">
<productname>lfs-bootscripts</productname>
<productnumber>&lfs-bootscripts-version;</productnumber>
<address>&lfs-bootscripts-url;</address>
<productname>hlfs-bootscripts</productname>
<productnumber>&hlfs-bootscripts-version;</productnumber>
<address>&hlfs-bootscripts-url;</address>
</sect1info>
 
<title>LFS-Bootscripts-&lfs-bootscripts-version;</title>
<title>HLFS-Bootscripts-&hlfs-bootscripts-version;</title>
<indexterm zone="ch-scripts-bootscripts">
<primary sortas="a-Bootscripts">Bootscripts</primary>
</indexterm>
22,8 → 22,8
<sect2 role="package">
<title/>
 
<para>Le paquet LFS-Bootscripts contient un ensemble de scripts de
démarrage pour démarrer/arrêter le système LFS lors de l'amorçage ou
<para>Le paquet HLFS-Bootscripts contient un ensemble de scripts de
démarrage pour démarrer/arrêter le système HLFS lors de l'amorçage ou
de l'arrêt.</para>
 
<segmentedlist>
31,8 → 31,8
<segtitle>&diskspace;</segtitle>
 
<seglistitem>
<seg>&lfs-bootscripts-ch7-sbu;</seg>
<seg>&lfs-bootscripts-ch7-du;</seg>
<seg>&hlfs-bootscripts-ch7-sbu;</seg>
<seg>&hlfs-bootscripts-ch7-du;</seg>
</seglistitem>
</segmentedlist>
 
39,7 → 39,7
</sect2>
 
<sect2 role="installation">
<title>Installation de LFS-Bootscripts</title>
<title>Installation de HLFS-Bootscripts</title>
 
<para>Installez le paquet&nbsp;:</para>
 
48,7 → 48,7
</sect2>
 
<sect2 id="contents-bootscripts" role="content">
<title>Contenu de LFS-Bootscripts</title>
<title>Contenu de HLFS-Bootscripts</title>
 
<segmentedlist>
<segtitle>Scripts installés</segtitle>
/trunk/hlfs/general.ent
1,5 → 1,5
<!ENTITY version "SVN-20110814">
<!ENTITY releasedate "14 août 2011">
<!ENTITY version "SVN-20110816">
<!ENTITY releasedate "16 août 2011">
<!ENTITY copyrightdate "1999-2011"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "1.0">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
/trunk/hlfs/appendices/scripts.xml
37,7 → 37,7
<?dbhtml dir="scripts"?>
<?dbhtml filename="scripts.html"?>
 
<title>Scripts de démarrage et de sysconfig version-&lfs-bootscripts-version;</title>
<title>Scripts de démarrage et de sysconfig version-&hlfs-bootscripts-version;</title>
 
<para>Les scripts dans cette annexe sont listés dans le répertoire
où ils résident normalement. L'ordre est
/trunk/hlfs/process-scripts.sh
1,10 → 1,10
#!/bin/bash
 
# Boot scripts
for s in bootscripts/lfs/init.d/* \
bootscripts/lfs/sysconfig/* \
bootscripts/lfs/sysconfig/network-devices/* \
bootscripts/lfs/sysconfig/network-devices/services/*
for s in bootscripts/hlfs/init.d/* \
bootscripts/hlfs/sysconfig/* \
bootscripts/hlfs/sysconfig/network-devices/* \
bootscripts/hlfs/sysconfig/network-devices/services/*
do
script=$(basename $s)
13,8 → 13,8
[ $script == 'services' ] && continue
 
# Disambiguate duplicate file names
[ $s == 'bootscripts/lfs/sysconfig/rc' ] && script='rc-sysinit';
[ $s == 'bootscripts/lfs/sysconfig/modules' ] && script='modules-sysinit';
[ $s == 'bootscripts/hlfs/sysconfig/rc' ] && script='rc-sysinit';
[ $s == 'bootscripts/hlfs/sysconfig/modules' ] && script='modules-sysinit';
sed -e 's/\&/\&amp\;/g' -e 's/</\&lt\;/g' -e 's/>/\&gt\;/g' \
-e "s/'/\&apos\;/g" -e 's/"/\&quot\;/g' -e 's/\t/ /g' \