Author: jim
Date: 2005-03-19 09:35:51 -0700 (Sat, 19 Mar 2005)
New Revision: 4781
Added:
trunk/bootscripts/contrib/lfs-bootscripts-raq2-3.patch
Removed:
trunk/bootscripts/contrib/lfs-bootscripts-raq2-2.patch
Log:
Updated: Raq2 bootscripts
Deleted: trunk/bootscripts/contrib/lfs-bootscripts-raq2-2.patch
===================================================================
--- trunk/bootscripts/contrib/lfs-bootscripts-raq2-2.patch 2005-03-19
15:25:10 UTC (rev 4780)
+++ trunk/bootscripts/contrib/lfs-bootscripts-raq2-2.patch 2005-03-19
16:35:51 UTC (rev 4781)
@@ -1,445 +0,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2005-01-14
-Initial Package Version: 3.1.x
-Origin: Jim Gifford
-Upstream Status: In Contrib
-Description: Modifies Bootscripts to work with the RaQ2
-
-diff -Naur lfs-bootscripts-3.1.0.orig/Makefile lfs-bootscripts-3.1.0/Makefile
---- lfs-bootscripts-3.1.0.orig/Makefile 2004-11-25 01:35:34.000000000
-0800
-+++ lfs-bootscripts-3.1.0/Makefile 2005-01-13 17:04:34.000000000 -0800
-@@ -29,6 +29,7 @@
- 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/hotplug ${EXTDIR}/rc.d/init.d
-+ install -m ${MODE} lfs/init.d/laststart ${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/
-@@ -38,10 +39,12 @@
- 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/syslog-ng ${EXTDIR}/rc.d/init.d
-+ install -m ${MODE} lfs/init.d/sshd ${EXTDIR}/rc.d/init.d/
-+ install -m ${MODE} lfs/init.d/syslog-ng ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} lfs/init.d/swap ${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 ${EXTDIR}/rc.d/init.d/
-+ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc0.d/K30sshd
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc0.d/K80network
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc0.d/K90syslog-ng
- ln -sf ../init.d/hotplug ${EXTDIR}/rc.d/rc0.d/S50hotplug
-@@ -50,16 +53,27 @@
- 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/sshd ${EXTDIR}/rc.d/rc1.d/K30sshd
-+ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc1.d/S99laststart
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc1.d/K80network
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc1.d/K90syslog-ng
-+ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc1.d/K30sshd
-+ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc2.d/S99laststart
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc2.d/K80network
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc2.d/K90syslog-ng
-+ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc3.d/S30sshd
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc3.d/S10syslog-ng
-+ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc3.d/S99laststart
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network
-+ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc4.d/S30sshd
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc4.d/S10syslog-ng
-+ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc4.d/S99laststart
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network
-+ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc5.d/S30sshd
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc5.d/S10syslog-ng
-+ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc5.d/S99laststart
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network
-+ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc6.d/K30sshd
- ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network
- ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc6.d/K90syslog-ng
- ln -sf ../init.d/hotplug ${EXTDIR}/rc.d/rc6.d/S50hotplug
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/cleanfs
lfs-bootscripts-3.1.0/lfs/init.d/cleanfs
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/cleanfs 2004-12-30
21:23:29.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/cleanfs 2005-01-13 17:07:02.000000000
-0800
-@@ -73,17 +73,21 @@
- case "${1}" in
- start)
- boot_mesg -n "Cleaning file systems:" ${INFO}
-+ putlcd "Cleaning file" "systems:"
-
- boot_mesg -n " /tmp" ${NORMAL}
-+ putlcd "Cleaning:" "/tmp"
- cd /tmp &&
- find . -xdev -mindepth 1 ! -name lost+found \
- -delete || failed=1
-
- boot_mesg -n " /var/lock" ${NORMAL}
-+ putlcd "Cleaning:" "/var/lock"
- cd /var/lock &&
- find . -type f ! -newer /proc -exec rm -f {} \; || failed=1
-
- boot_mesg " /var/run" ${NORMAL}
-+ putlcd "Cleaning:" "/var/run"
- cd /var/run &&
- find . ! -type d ! -name utmp ! -newer /proc \
- -exec rm -f {} \; || failed=1
-@@ -99,6 +103,7 @@
- if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null
- then
- boot_mesg "Creating files and directories..."
-+ putlcd "Creating files" "and directories"
- create_files
- evaluate_retval
- fi
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/console
lfs-bootscripts-3.1.0/lfs/init.d/console
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/console 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/console 2005-01-13 17:04:34.000000000
-0800
-@@ -27,6 +27,7 @@
- if [ -n "${KEYMAP}" ]
- then
- boot_mesg "Loading keymap: ${KEYMAP}..."
-+ putlcd "Loading keymap:" "${KEYMAP}"
- loadkeys ${KEYMAP} &>/dev/null
- evaluate_retval
- fi
-@@ -34,6 +35,7 @@
- if [ -n "${KEYMAP_CORRECTIONS}" ]
- then
- boot_mesg "Loading keymap corrections:
${KEYMAP_CORRECTIONS}..."
-+ putlcd "Loading keymap" "corrections"
- loadkeys ${KEYMAP_CORRECTIONS} &>/dev/null
- evaluate_retval
- fi
-@@ -41,6 +43,7 @@
- if [ -n "${FONT}" ]
- then
- boot_mesg "Setting screen font to ${FONT}..."
-+ putlcd "Setting font" "to $FONT"
- setfont $FONT &>/dev/null
- evaluate_retval
- fi
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/halt
lfs-bootscripts-3.1.0/lfs/init.d/halt
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/halt 2004-12-20 22:45:11.000000000
-0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/halt 2005-01-13 17:04:34.000000000
-0800
-@@ -17,6 +17,7 @@
-
- case "${1}" in
- stop)
-+ putlcd "Shutdown" "Completed"
- halt -d -f -i -p
- ;;
- *)
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/hotplug
lfs-bootscripts-3.1.0/lfs/init.d/hotplug
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/hotplug 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/hotplug 2005-01-13 17:04:34.000000000
-0800
-@@ -18,6 +18,7 @@
- case "${1}" in
- start|restart)
- boot_mesg "Loading modules for system devices..."
-+ putlcd "Loading modules" "for devices"
- for rc in /etc/hotplug/*.rc
- do
- ${rc} ${1}
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/laststart
lfs-bootscripts-3.1.0/lfs/init.d/laststart
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/laststart 1969-12-31
16:00:00.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/laststart 2005-01-13 17:04:34.000000000
-0800
-@@ -0,0 +1,31 @@
-+#!/bin/sh
-+########################################################################
-+# Begin $rc_base/init.d/laststart
-+#
-+# Description : Show IP Addresses on LCD Screen
-+#
-+# Author : Jim Gifford - [EMAIL PROTECTED]
-+#
-+# Version : 00.00
-+#
-+# Notes :
-+#
-+########################################################################
-+
-+. /etc/sysconfig/rc
-+. $rc_functions
-+
-+case "$1" in
-+ start)
-+ IFACE1_IP="`ip addr show dev eth0 | grep inet | cut -d / -f 1 |
cut -d t -f 2 | cut -d' ' -f 2 `"
-+ IFACE2_IP="`ip addr show dev eth1 | grep inet | cut -d / -f 1 |
cut -d t -f 2 | cut -d' ' -f 2 `"
-+ putlcd "1 $IFACE1_IP" "2 $IFACE2_IP"
-+ ;;
-+ *)
-+ echo "Usage: {start}"
-+ exit 1
-+ ;;
-+esac
-+
-+# End $rc_base/init.d/laststart
-+
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/mountfs
lfs-bootscripts-3.1.0/lfs/init.d/mountfs
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/mountfs 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/mountfs 2005-01-13 17:04:34.000000000
-0800
-@@ -18,6 +18,7 @@
- case "${1}" in
- start)
- boot_mesg "Remounting root file system in read-write mode..."
-+ putlcd "Remounting /" "in rw mode"
- mount -n -o remount,rw / &>/dev/null
- evaluate_retval
-
-@@ -25,6 +26,7 @@
- rm -f /fastboot /forcefsck
-
- boot_mesg "Recording existing mounts in /etc/mtab..."
-+ putlcd "Recording mounts" "in /etc/mtab"
- > /etc/mtab
- mount -f / || failed=1
- mount -f /proc || failed=1
-@@ -38,12 +40,14 @@
- # 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..."
-+ putlcd "Mounting" "file systems"
- mount -a -O no_netdev &>/dev/null
- evaluate_retval
- ;;
-
- stop)
- boot_mesg "Unmounting all other currently mounted file
systems..."
-+ putlcd "Unmounting" "file systems"
- umount -a -d -r -t noramfs &>/dev/null
- evaluate_retval
- ;;
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/rc
lfs-bootscripts-3.1.0/lfs/init.d/rc
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/rc 2004-12-30 21:23:29.000000000
-0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/rc 2005-01-13 17:04:34.000000000
-0800
-@@ -35,6 +35,7 @@
- if [ ! -d ${rc_base}/rc${runlevel}.d ]
- then
- boot_mesg "${rc_base}/rc${runlevel}.d does not exist." ${WARNING}
-+ putlcd "${rc_base}/rc${runlevel}.d" "does not exist."
- boot_mesg_flush
- exit 1
- fi
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/reboot
lfs-bootscripts-3.1.0/lfs/init.d/reboot
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/reboot 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/reboot 2005-01-13 17:04:34.000000000
-0800
-@@ -18,6 +18,7 @@
- case "${1}" in
- stop)
- boot_mesg "Restarting system..."
-+ putlcd "Restarting" "system..."
- reboot -d -f -i
- ;;
-
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/sendsignals
lfs-bootscripts-3.1.0/lfs/init.d/sendsignals
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/sendsignals 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/sendsignals 2005-01-13
17:04:34.000000000 -0800
-@@ -18,6 +18,7 @@
- case "${1}" in
- stop)
- boot_mesg "Sending all processes the TERM signal..."
-+ putlcd "Sending TERM" "signal"
- killall5 -15
- error_value=${?}
-
-@@ -31,6 +32,7 @@
- fi
-
- boot_mesg "Sending all processes the KILL signal..."
-+ putlcd "Sending KILL" "signal"
- killall5 -9
- error_value=${?}
-
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/setclock
lfs-bootscripts-3.1.0/lfs/init.d/setclock
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/setclock 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/setclock 2005-01-13 17:04:34.000000000
-0800
-@@ -32,12 +32,14 @@
- case ${1} in
- start)
- boot_mesg "Setting system clock..."
-+ putlcd "Setting:" "system clock"
- hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
- evaluate_retval
- ;;
-
- stop)
- boot_mesg "Setting hardware clock..."
-+ putlcd "Setting:" "hardware clock"
- hwclock --systohc ${CLOCKPARAMS} &>/dev/null
- evaluate_retval
- ;;
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/sshd
lfs-bootscripts-3.1.0/lfs/init.d/sshd
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/sshd 1969-12-31 16:00:00.000000000
-0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/sshd 2005-01-13 17:04:34.000000000
-0800
-@@ -0,0 +1,54 @@
-+#!/bin/sh
-+########################################################################
-+# Begin $rc_base/init.d/sshd
-+#
-+# Description : SSH Server
-+#
-+# Author :
-+#
-+# Version : 00.01
-+#
-+# Notes :
-+#
-+########################################################################
-+
-+. /etc/sysconfig/rc
-+. $rc_functions
-+
-+case "$1" in
-+ start)
-+ echo "Starting SSH Server..."
-+ putlcd "Starting:" "SSH Server"
-+ loadproc /usr/sbin/sshd
-+ ;;
-+
-+ stop)
-+ echo "Stopping SSH Server..."
-+ putlcd "Stopping:" "SSH Server"
-+ killproc /usr/sbin/sshd
-+ ;;
-+
-+ reload)
-+ echo "Reloading SSH Server..."
-+ reloadproc /usr/sbin/sshd
-+ ;;
-+
-+ restart)
-+ $0 stop
-+ sleep 1
-+ $0 start
-+ ;;
-+
-+ status)
-+ statusproc /usr/sbin/sshd
-+ ;;
-+
-+ *)
-+ echo "Usage: $0 {start|stop|reload|restart|status}"
-+ exit 1
-+ ;;
-+esac
-+
-+# End $rc_base/init.d/sshd
-+
-+
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/swap
lfs-bootscripts-3.1.0/lfs/init.d/swap
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/swap 2004-12-20 22:45:11.000000000
-0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/swap 2005-01-13 17:04:34.000000000
-0800
-@@ -18,12 +18,14 @@
- case "${1}" in
- start)
- boot_mesg "Activating all swap files/partitions..."
-+ putlcd "Activating" "swap"
- swapon -a
- evaluate_retval
- ;;
-
- stop)
- boot_mesg "Deactivating all swap files/partitions..."
-+ putlcd "Deactivating" "swap"
- swapoff -a
- evaluate_retval
- ;;
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/init.d/syslog-ng
lfs-bootscripts-3.1.0/lfs/init.d/syslog-ng
---- lfs-bootscripts-3.1.0.orig/lfs/init.d/syslog-ng 2004-12-20
22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/init.d/syslog-ng 2005-01-13 17:04:34.000000000
-0800
-@@ -18,11 +18,13 @@
- case "${1}" in
- start)
- boot_mesg "Starting system log daemon..."
-+ putlcd "Starting:" "system log"
- loadproc syslog-ng
- ;;
-
- stop)
- boot_mesg "Stopping system log daemon..."
-+ putlcd "Stopping:" "system log"
- killproc syslog-ng
- ;;
-
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/ifdown
lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/ifdown
---- lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/ifdown
2004-12-30 21:23:29.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/ifdown 2005-01-13
17:04:34.000000000 -0800
-@@ -73,6 +73,7 @@
- IFCONFIG=${file}
${network_devices}/services/${SERVICE} ${1} down
- else
- boot_mesg "Interface ${1} doesn't exist."
${WARNING}
-+ putlcd "Interface ${1}" "doesn't exist."
- echo_warning
- fi
- else
-@@ -93,6 +94,7 @@
- if echo "${link_status}" | grep -q UP
- then
- boot_mesg "Bringing down the ${1} interface..."
-+ putlcd "Bringing down" "${1} interface"
- ip link set ${1} down
- evaluate_retval
- fi
-diff -Naur lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/ifup
lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/ifup
---- lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/ifup
2004-12-20 22:45:11.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/ifup 2005-01-13
17:04:34.000000000 -0800
-@@ -81,6 +81,7 @@
- IFCONFIG=${file}
${network_devices}/services/${SERVICE} ${1} up
- else
- boot_mesg "Interface ${1} doesn't exist."
${WARNING}
-+ putlcd "Interface ${1}" "doesn't exist."
- echo_warning
- fi
- else
-diff -Naur
lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/services/ipv4-static
lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/services/ipv4-static
----
lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/services/ipv4-static
2004-12-30 21:23:29.000000000 -0800
-+++ lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/services/ipv4-static
2005-01-13 17:04:34.000000000 -0800
-@@ -57,6 +57,7 @@
- case "${2}" in
- up)
- boot_mesg "Adding IPv4 address ${IP} to the ${1} interface..."
-+ putlcd "Setting" "${1} IP - ${IP}"
- ip addr add ${args} dev ${1}
- evaluate_retval
-
-@@ -68,6 +69,7 @@
- echo_warning
- else
- boot_mesg "Setting up default gateway..."
-+ putlcd "Setting up" "default gateway"
- ip route add default via ${GATEWAY} dev ${1}
- evaluate_retval
- fi
-@@ -78,11 +80,13 @@
- if [ -n "${GATEWAY}" ]
- then
- boot_mesg "Removing default gateway..."
-+ putlcd "Removing" "default gateway"
- ip route del default
- evaluate_retval
- fi
-
- boot_mesg "Removing IPv4 address ${IP} from the ${1}
interface..."
-+ putlcd "Unsetting" "${1} IP - ${IP}"
- ip addr del ${args} dev ${1}
- evaluate_retval
- ;;
-diff -Naur
lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/services/ipv4-static-route
lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/services/ipv4-static-route
----
lfs-bootscripts-3.1.0.orig/lfs/sysconfig/network-devices/services/ipv4-static-route
2004-12-20 22:45:11.000000000 -0800
-+++
lfs-bootscripts-3.1.0/lfs/sysconfig/network-devices/services/ipv4-static-route
2005-01-13 17:04:34.000000000 -0800
-@@ -79,12 +79,14 @@
- case "${2}" in
- up)
- boot_mesg "Adding '${desc}' route to the ${1} interface..."
-+ putlcd "Adding route" "${desc}"
- ip route add ${args} dev ${1}
- evaluate_retval
- ;;
-
- down)
- boot_mesg "Removing '${desc}' route from the ${1} interface..."
-+ putlcd "Removing route" "${desc}"
- ip route del ${args} dev ${1}
- evaluate_retval
- ;;
Added: trunk/bootscripts/contrib/lfs-bootscripts-raq2-3.patch
===================================================================
--- trunk/bootscripts/contrib/lfs-bootscripts-raq2-3.patch 2005-03-19
15:25:10 UTC (rev 4780)
+++ trunk/bootscripts/contrib/lfs-bootscripts-raq2-3.patch 2005-03-19
16:35:51 UTC (rev 4781)
@@ -0,0 +1,896 @@
+Submitted By: Jim Gifford (patches at jg555 dot com)
+Date: 2005-03-19
+Initial Package Version: 3.1.x
+Origin: Jim Gifford
+Upstream Status: In Contrib
+Description: Modifies Bootscripts to work with the RaQ2
+
+diff -Naur bootscripts/lfs/init.d/checkfs bootscripts.raq2/lfs/init.d/checkfs
+--- bootscripts/lfs/init.d/checkfs 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/checkfs 2005-03-19 08:25:06.853255720
-0800
+@@ -33,11 +33,13 @@
+ if [ -f /fastboot ]; then
+ boot_mesg -n "/fastboot found, will not perform" ${INFO}
+ boot_mesg " file system checks as requested."
++ putlcd "Fast boot requested"
+ echo_ok
+ exit 0
+ fi
+
+ boot_mesg "Mounting root file system in read-only mode..."
++ putlcd "Mounting / in" "read-only mode"
+ mount -n -o remount,ro / >/dev/null
+ evaluate_retval
+
+@@ -48,15 +50,16 @@
+ 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
++ putlcd "FileSystem Error" "Halting System"
++ sleep 10
+ /etc/rc.d/init.d/halt stop
+ fi
+
+ if [ -f /forcefsck ]; then
+ boot_mesg -n "/forcefsck found, forcing file" ${INFO}
+ boot_mesg " system checks as requested."
++ putlcd "Forcing file" "system check"
+ echo_ok
+ options="-f"
+ else
+@@ -64,6 +67,7 @@
+ fi
+
+ boot_mesg "Checking file systems..."
++ putlcd "Checking file" "systems..."
+ # Note: -a option used to be -p; but this fails e.g.
+ # on fsck.minix
+ fsck ${options} -a -A -C -T 2>/dev/null
+@@ -90,9 +94,9 @@
+ 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
++ putlcd "Errors corrected" "Rebooting"
++ sleep 5
+ reboot -f
+ fi
+
+@@ -107,9 +111,9 @@
+ 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
++ putlcd "FileSystem Error" "Halting System"
++ sleep 10
+ /etc/rc.d/init.d/halt stop
+ fi
+
+diff -Naur bootscripts/lfs/init.d/cleanfs bootscripts.raq2/lfs/init.d/cleanfs
+--- bootscripts/lfs/init.d/cleanfs 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/cleanfs 2005-03-18 08:47:19.000000000
-0800
+@@ -72,17 +72,21 @@
+ case "${1}" in
+ start)
+ boot_mesg -n "Cleaning file systems:" ${INFO}
++ putlcd "Cleaning file" "systems:"
+
+ boot_mesg -n " /tmp" ${NORMAL}
++ putlcd "Cleaning:" "/tmp"
+ cd /tmp &&
+ find . -xdev -mindepth 1 ! -name lost+found \
+ -delete || failed=1
+
+ boot_mesg -n " /var/lock" ${NORMAL}
++ putlcd "Cleaning:" "/var/lock"
+ cd /var/lock &&
+ find . -type f ! -newer /proc -exec rm -f {} \; || failed=1
+
+ boot_mesg " /var/run" ${NORMAL}
++ putlcd "Cleaning:" "/var/run"
+ cd /var/run &&
+ find . ! -type d ! -name utmp ! -newer /proc \
+ -exec rm -f {} \; || failed=1
+@@ -97,6 +101,7 @@
+
+ if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null;
then
+ boot_mesg "Creating files and directories..."
++ putlcd "Creating files" "and directories"
+ create_files
+ evaluate_retval
+ fi
+diff -Naur bootscripts/lfs/init.d/console bootscripts.raq2/lfs/init.d/console
+--- bootscripts/lfs/init.d/console 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/console 2005-03-18 08:47:19.000000000
-0800
+@@ -25,18 +25,21 @@
+ start)
+ if [ -n "${KEYMAP}" ]; then
+ boot_mesg "Loading keymap: ${KEYMAP}..."
++ putlcd "Loading keymap:" "${KEYMAP}"
+ loadkeys ${KEYMAP} &>/dev/null
+ evaluate_retval
+ fi
+
+ if [ -n "${KEYMAP_CORRECTIONS}" ]; then
+ boot_mesg "Loading keymap corrections:
${KEYMAP_CORRECTIONS}..."
++ putlcd "Loading keymap" "corrections"
+ loadkeys ${KEYMAP_CORRECTIONS} &>/dev/null
+ evaluate_retval
+ fi
+
+ if [ -n "${FONT}" ]; then
+ boot_mesg "Setting screen font to ${FONT}..."
++ putlcd "Setting font" "to $FONT"
+ setfont $FONT &>/dev/null
+ evaluate_retval
+ fi
+diff -Naur bootscripts/lfs/init.d/functions
bootscripts.raq2/lfs/init.d/functions
+--- bootscripts/lfs/init.d/functions 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/functions 2005-03-18 12:59:02.000000000
-0800
+@@ -263,7 +263,8 @@
+ boot_mesg -n " the LFS book, please be so kind to inform us at"
+ boot_mesg " [EMAIL PROTECTED]"
+ boot_mesg_flush
+- boot_mesg -n "Press Enter to continue..." ${INFO}
++ putlcd "BootScript Error" "view bootlog"
++ sleep 20
+ boot_mesg "" ${NORMAL}
+ read ENTER
+ }
+diff -Naur bootscripts/lfs/init.d/halt bootscripts.raq2/lfs/init.d/halt
+--- bootscripts/lfs/init.d/halt 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/halt 2005-03-18 08:47:19.000000000 -0800
+@@ -17,6 +17,7 @@
+
+ case "${1}" in
+ stop)
++ putlcd "Shutdown" "Completed"
+ halt -d -f -i -p
+ ;;
+ *)
+diff -Naur bootscripts/lfs/init.d/hotplug bootscripts.raq2/lfs/init.d/hotplug
+--- bootscripts/lfs/init.d/hotplug 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/hotplug 2005-03-19 08:25:52.724282264
-0800
+@@ -6,7 +6,7 @@
+ #
+ # Authors : Zack Winkles
+ #
+-# Version : 00.02
++# Version : 00.00
+ #
+ # Notes :
+ #
+@@ -18,6 +18,7 @@
+ case "${1}" in
+ start|restart)
+ boot_mesg "Loading modules for system devices..."
++ putlcd "Loading modules" "for devices"
+ for rc in /etc/hotplug/*.rc
+ do
+ ${rc} ${1}
+@@ -25,12 +26,14 @@
+ echo_ok
+ ;;
+ stop)
++ # Remove hotplug as the default manager of hotplug events
++ echo /bin/true > /proc/sys/kernel/hotplug
++
+ # Remove /var/log/hotplug/events
+ rm /var/log/hotplug/events
+-
++
+ # Recreate /var/log/hotplug/events
+ touch /var/log/hotplug/events
+-
+ ;;
+ status)
+ for rc in /etc/hotplug/*.rc
+diff -Naur bootscripts/lfs/init.d/laststart
bootscripts.raq2/lfs/init.d/laststart
+--- bootscripts/lfs/init.d/laststart 1969-12-31 16:00:00.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/laststart 2005-03-18 08:47:19.000000000
-0800
+@@ -0,0 +1,31 @@
++#!/bin/sh
++########################################################################
++# Begin $rc_base/init.d/laststart
++#
++# Description : Show IP Addresses on LCD Screen
++#
++# Author : Jim Gifford - [EMAIL PROTECTED]
++#
++# Version : 00.00
++#
++# Notes :
++#
++########################################################################
++
++. /etc/sysconfig/rc
++. $rc_functions
++
++case "$1" in
++ start)
++ IFACE1_IP="`ip addr show dev eth0 | grep inet | cut -d / -f 1 |
cut -d t -f 2 | cut -d' ' -f 2 `"
++ IFACE2_IP="`ip addr show dev eth1 | grep inet | cut -d / -f 1 |
cut -d t -f 2 | cut -d' ' -f 2 `"
++ putlcd "1 $IFACE1_IP" "2 $IFACE2_IP"
++ ;;
++ *)
++ echo "Usage: {start}"
++ exit 1
++ ;;
++esac
++
++# End $rc_base/init.d/laststart
++
+diff -Naur bootscripts/lfs/init.d/localnet bootscripts.raq2/lfs/init.d/localnet
+--- bootscripts/lfs/init.d/localnet 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/localnet 2005-03-18 12:55:58.000000000
-0800
+@@ -19,17 +19,20 @@
+ case "${1}" in
+ start)
+ boot_mesg "Bringing up the loopback interface..."
++ putlcd "Loopback:" "Up"
+ ip link set lo up
+ ip addr add 127.0.0.1/8 label lo dev lo
+ evaluate_retval
+
+ boot_mesg "Setting hostname to ${HOSTNAME}..."
++ putlcd "Hostname:" "${HOSTNAME}"
+ hostname ${HOSTNAME}
+ evaluate_retval
+ ;;
+
+ stop)
+ boot_mesg "Bringing down the loopback interface..."
++ putlcd "Loopback:" "Down"
+ ip link set lo down
+ evaluate_retval
+ ;;
+diff -Naur bootscripts/lfs/init.d/modules bootscripts.raq2/lfs/init.d/modules
+--- bootscripts/lfs/init.d/modules 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/modules 2005-03-18 12:56:30.000000000
-0800
+@@ -60,6 +60,7 @@
+ # otherwise take note.
+ if [ ${?} -eq 0 ]; then
+ boot_mesg -n " ${module}"
${NORMAL}
++ putlcd "Module:" "${module}"
+ else
+ failedmod="${failedmod}
${module}"
+ fi
+diff -Naur bootscripts/lfs/init.d/mountfs bootscripts.raq2/lfs/init.d/mountfs
+--- bootscripts/lfs/init.d/mountfs 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/mountfs 2005-03-19 08:27:09.058677672
-0800
+@@ -18,6 +18,7 @@
+ case "${1}" in
+ start)
+ boot_mesg "Remounting root file system in read-write mode..."
++ putlcd "Remounting:" "/"
+ mount -n -o remount,rw / &>/dev/null
+ evaluate_retval
+
+@@ -25,6 +26,7 @@
+ rm -f /fastboot /forcefsck
+
+ boot_mesg "Recording existing mounts in /etc/mtab..."
++ putlcd "Recording mounts" "in /etc/mtab"
+ > /etc/mtab
+ mount -f / || failed=1
+ mount -f /proc || failed=1
+@@ -35,13 +37,15 @@
+ # 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..."
++ putlcd "Mounting:" "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
++ putlcd "Unmounting:" "file systems"
++ umount -a -d -r -t noramfs &>/dev/null
+ evaluate_retval
+ ;;
+
+diff -Naur bootscripts/lfs/init.d/mountkernfs
bootscripts.raq2/lfs/init.d/mountkernfs
+--- bootscripts/lfs/init.d/mountkernfs 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/mountkernfs 2005-03-19 08:12:34.205675544
-0800
+@@ -18,7 +18,6 @@
+ 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
+diff -Naur bootscripts/lfs/init.d/network bootscripts.raq2/lfs/init.d/network
+--- bootscripts/lfs/init.d/network 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/network 2005-03-18 08:47:19.000000000
-0800
+@@ -30,19 +30,12 @@
+ continue
+ fi
+
+- # A subshell allows us to open files,
+- # without contaminating our network bootscript with
+- # unneeded variables
+- (
+- . ${file}
+- # If ONBOOT does not equal yes, process the
next file
+- if [ "${ONBOOT}" != "yes" ]; then
+- continue
+- fi
+-
+- # Bring up ${interface}
+- ${network_devices}/ifup ${interface}
+- )
++ # skip if $file ends with ~ (backup files)
++ if [ "${file}" != "${file%""~""}" ]; then
++ continue
++ fi
++
++ IN_BOOT=1 ${network_devices}/ifup ${interface}
+ done
+ ;;
+
+@@ -64,19 +57,12 @@
+ continue
+ fi
+
+- # A subshell allows us to open files,
+- # without contaminating our network bootscript with
+- # unneeded variables
+- (
+- . ${file}
+- # If ONBOOT does not equal yes, process the
next file
+- if [ "${ONBOOT}" != "yes" ]; then
+- continue
+- fi
+-
+- # Bring up ${interface}
+- ${network_devices}/ifdown ${interface}
+- )
++ # skip if $file ends with ~ (backup files)
++ if [ "${file}" != "${file%""~""}" ]; then
++ continue
++ fi
++
++ IN_BOOT=1 ${network_devices}/ifdown ${interface}
+ done
+ ;;
+
+diff -Naur bootscripts/lfs/init.d/rc bootscripts.raq2/lfs/init.d/rc
+--- bootscripts/lfs/init.d/rc 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/rc 2005-03-18 12:59:27.000000000 -0800
+@@ -33,6 +33,7 @@
+
+ if [ ! -d ${rc_base}/rc${runlevel}.d ]; then
+ boot_mesg "${rc_base}/rc${runlevel}.d does not exist." ${WARNING}
++ putlcd "${rc_base}/rc${runlevel}.d" "does not exist."
+ boot_mesg_flush
+ exit 1
+ fi
+@@ -56,6 +57,8 @@
+ boot_mesg -n " not started in the previous"
+ boot_mesg -n " runlevel (${previous})."
+ boot_mesg "" ${NORMAL}
++ putlcd "BootScript Error" "view bootlog"
++ sleep 20
+ boot_mesg_flush
+ continue
+ fi
+@@ -92,7 +95,7 @@
+ esac
+ error_value=${?}
+
+- if [ "${error_value}" != "0" ]; then
++ if [ "${error_value}" != "0" ]; then
+ print_error_msg
+ fi
+ done
+diff -Naur bootscripts/lfs/init.d/reboot bootscripts.raq2/lfs/init.d/reboot
+--- bootscripts/lfs/init.d/reboot 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/reboot 2005-03-18 13:00:00.000000000 -0800
+@@ -17,7 +17,7 @@
+
+ case "${1}" in
+ stop)
+- boot_mesg "Restarting system..."
++ putlcd "Restarting" "system..."
+ reboot -d -f -i
+ ;;
+
+diff -Naur bootscripts/lfs/init.d/sendsignals
bootscripts.raq2/lfs/init.d/sendsignals
+--- bootscripts/lfs/init.d/sendsignals 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/sendsignals 2005-03-18 13:00:29.000000000
-0800
+@@ -18,6 +18,7 @@
+ case "${1}" in
+ stop)
+ boot_mesg "Sending all processes the TERM signal..."
++ putlcd "Sending:" " TERM signal"
+ killall5 -15
+ error_value=${?}
+
+@@ -30,6 +31,7 @@
+ fi
+
+ boot_mesg "Sending all processes the KILL signal..."
++ putlcd "Sending:" "KILL signal"
+ killall5 -9
+ error_value=${?}
+
+diff -Naur bootscripts/lfs/init.d/setclock bootscripts.raq2/lfs/init.d/setclock
+--- bootscripts/lfs/init.d/setclock 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/setclock 2005-03-18 08:47:19.000000000
-0800
+@@ -32,12 +32,14 @@
+ case ${1} in
+ start)
+ boot_mesg "Setting system clock..."
++ putlcd "Setting:" "system clock"
+ hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
+ evaluate_retval
+ ;;
+
+ stop)
+ boot_mesg "Setting hardware clock..."
++ putlcd "Setting:" "hardware clock"
+ hwclock --systohc ${CLOCKPARAMS} &>/dev/null
+ evaluate_retval
+ ;;
+diff -Naur bootscripts/lfs/init.d/sshd bootscripts.raq2/lfs/init.d/sshd
+--- bootscripts/lfs/init.d/sshd 1969-12-31 16:00:00.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/sshd 2005-03-18 12:48:31.000000000 -0800
+@@ -0,0 +1,52 @@
++#!/bin/sh
++########################################################################
++# Begin $rc_base/init.d/sshd
++#
++# Description : SSH Server
++#
++# Author :
++#
++# Version : 00.01
++#
++# Notes :
++#
++########################################################################
++
++. /etc/sysconfig/rc
++. $rc_functions
++
++case "$1" in
++ start)
++ echo "Starting SSH Server..."
++ putlcd "Starting:" "SSH Server"
++ loadproc /usr/sbin/sshd
++ ;;
++
++ stop)
++ echo "Stopping SSH Server..."
++ putlcd "Stopping:" "SSH Server"
++ killproc /usr/sbin/sshd
++ ;;
++
++ reload)
++ echo "Reloading SSH Server..."
++ reloadproc /usr/sbin/sshd
++ ;;
++
++ restart)
++ $0 stop
++ sleep 1
++ $0 start
++ ;;
++
++ status)
++ statusproc /usr/sbin/sshd
++ ;;
++
++ *)
++ echo "Usage: $0 {start|stop|reload|restart|status}"
++ exit 1
++ ;;
++esac
++
++# End $rc_base/init.d/sshd
+diff -Naur bootscripts/lfs/init.d/swap bootscripts.raq2/lfs/init.d/swap
+--- bootscripts/lfs/init.d/swap 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/swap 2005-03-18 13:01:10.000000000 -0800
+@@ -18,12 +18,14 @@
+ case "${1}" in
+ start)
+ boot_mesg "Activating all swap files/partitions..."
++ putlcd "Activating:" "swap"
+ swapon -a
+ evaluate_retval
+ ;;
+
+ stop)
+ boot_mesg "Deactivating all swap files/partitions..."
++ putlcd "Deactivating:" "swap"
+ swapoff -a
+ evaluate_retval
+ ;;
+diff -Naur bootscripts/lfs/init.d/sysctl bootscripts.raq2/lfs/init.d/sysctl
+--- bootscripts/lfs/init.d/sysctl 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/sysctl 2005-03-18 13:05:54.000000000 -0800
+@@ -21,6 +21,7 @@
+ start)
+ if [ -f "/etc/sysctl.conf" ]; then
+ boot_mesg "Setting kernel runtime parameters..."
++ putlcd "Utilizing:" "sysctl"
+ sysctl -q -p
+ evaluate_retval
+ fi
+diff -Naur bootscripts/lfs/init.d/syslog-ng
bootscripts.raq2/lfs/init.d/syslog-ng
+--- bootscripts/lfs/init.d/syslog-ng 2005-01-13 23:20:19.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/syslog-ng 2005-03-18 08:47:19.000000000
-0800
+@@ -18,11 +18,13 @@
+ case "${1}" in
+ start)
+ boot_mesg "Starting system log daemon..."
++ putlcd "Starting:" "system log"
+ loadproc syslog-ng
+ ;;
+
+ stop)
+ boot_mesg "Stopping system log daemon..."
++ putlcd "Stopping:" "system log"
+ killproc syslog-ng
+ ;;
+
+diff -Naur bootscripts/lfs/init.d/udev bootscripts.raq2/lfs/init.d/udev
+--- bootscripts/lfs/init.d/udev 2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/init.d/udev 2005-03-18 13:09:15.000000000 -0800
+@@ -6,7 +6,7 @@
+ #
+ # Authors : Zack Winkles
+ #
+-# Version : 00.01
++# Version : 00.00
+ #
+ # Notes :
+ #
+@@ -39,7 +39,8 @@
+ boot_mesg -n " will be halted and powered off."
+ boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
+ boot_mesg "" ${NORMAL}
+- read ENTER
++ putlcd "BootScript Error" "view bootlog"
++ sleep 20
+ /etc/rc.d/init.d/halt stop
+ fi
+
+@@ -57,12 +58,13 @@
+ boot_mesg -n " will be halted and powered off."
+ boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
+ boot_mesg "" ${NORMAL}
+- read ENTER
++ putlcd "BootScript Error" "view bootlog"
++ sleep 20
+ /etc/rc.d/init.d/halt stop
+ fi
+
+- # Assign udevsend to get hotplug events. udevsend can manage
the whole
+- # hotplug handling by taking over the kernel spawned event
process
++ # Assign hotplug to get hotplug events. The LFS Book disables
++ # automatically using hotplug until the system is ready for it
+ echo /sbin/udevsend > /proc/sys/kernel/hotplug
+
+ # Populate /dev with all the devices that are already available,
+diff -Naur bootscripts/lfs/sysconfig/network-devices/ifdown
bootscripts.raq2/lfs/sysconfig/network-devices/ifdown
+--- bootscripts/lfs/sysconfig/network-devices/ifdown 2005-03-18
08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/sysconfig/network-devices/ifdown 2005-03-19
08:19:16.272552088 -0800
+@@ -5,22 +5,21 @@
+ # Description : Interface Down
+ #
+ # Authors : Nathan Coulson - [EMAIL PROTECTED]
+-# Kevin P. Fleming - [EMAIL PROTECTED]
++# Kevin P. Fleming - [EMAIL PROTECTED]
+ #
+ # 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.
++# 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 [EMAIL PROTECTED] # All parameters except $1
++ for file in [EMAIL PROTECTED]
+ do
+ FILES="${FILES} ${network_devices}/ifconfig.${1}/${file}"
+ done
+@@ -30,17 +29,17 @@
+ 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}
++for file in ${FILES2}
+ 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
+@@ -49,23 +48,30 @@
+ (
+ . ${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
++ 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}
++ putlcd "Interface ${1}" "doesn't exist."
+ echo_warning
+ fi
+ else
+- boot_mesg "Unable to process ${file}. Either"
${FAILURE}
+- boot_mesg " the SERVICE variable was not set,"
++ 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
+@@ -73,12 +79,13 @@
+ )
+ done
+
+-
+-if [ -z "${2}" ]; then
++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..."
++ putlcd "Bringing down" "${1} interface"
+ ip link set ${1} down
+ evaluate_retval
+ fi
+diff -Naur bootscripts/lfs/sysconfig/network-devices/ifup
bootscripts.raq2/lfs/sysconfig/network-devices/ifup
+--- bootscripts/lfs/sysconfig/network-devices/ifup 2005-03-18
08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/sysconfig/network-devices/ifup 2005-03-19
08:31:40.003487800 -0800
+@@ -18,9 +18,20 @@
+ . /etc/sysconfig/rc
+ . ${rc_functions}
+
+-# Collect a list of configuration files for our interface
++bring_link_up()
++{
++ 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 up the ${1} interface..."
++ ip link set ${1} up
++ evaluate_retval
++ fi
++ fi
++}
++
+ if [ -n "${2}" ]; then
+- for file in [EMAIL PROTECTED] # All parameters except $1
++ for file in [EMAIL PROTECTED]
+ do
+ FILES="${FILES} ${network_devices}/ifconfig.${1}/${file}"
+ done
+@@ -30,52 +41,40 @@
+ FILES="${network_devices}/ifconfig.${1}"
+ fi
+
+-
+-boot_mesg "Bringing up the ${1} interface..."
+-boot_mesg_flush
+-
+-# 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."
${WARNING}
++ 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
++ if [ "${IN_HOTPLUG}" = "1" -a "${ONHOTPLUG}" != "yes" -a
"${HOSTNAME}" != "(none)" ]; then
+ continue
+ fi
+
+- if [ -n "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o
"${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
+-
+- # Activate the interface, if not activated
+- if ip link show ${1} > /dev/null 2>&1; then
+- link_status=`ip link show ${1} 2> /dev/null`
+- if [ -n "${link_status}" ]; then
+- if ! echo "${link_status}" | grep -q
UP; then
+- ip link set ${1} up
+- if [ "$?" != "0" ]; then
+- boot_mesg "Unable to
activate ${1}." ${FAILURE}
+- echo_failure
+- fi
+- fi
+- fi
++ if [ -n "${SERVICE}" -a -x
"${network_devices}/services/${SERVICE}" ]; then
++ if ip link show ${1} > /dev/null 2>&1
++ then
++ bring_link_up ${1}
++ IFCONFIG=${file}
${network_devices}/services/${SERVICE} ${1} up
+ else
+ boot_mesg "Interface ${1} doesn't exist."
${WARNING}
++ putlcd "Interface ${1}" "doesn't exist."
+ echo_warning
+- exit 0
+ fi
+-
+- fi
+- # This will run the service script, if SERVICE is set
+- if [ -n "${SERVICE}" -a -x
"${network_devices}/services/${SERVICE}" ]; then
+- 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,"
+diff -Naur bootscripts/lfs/sysconfig/network-devices/services/ipv4-static
bootscripts.raq2/lfs/sysconfig/network-devices/services/ipv4-static
+--- bootscripts/lfs/sysconfig/network-devices/services/ipv4-static
2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/sysconfig/network-devices/services/ipv4-static
2005-03-18 08:49:41.000000000 -0800
+@@ -50,6 +50,7 @@
+ case "${2}" in
+ up)
+ boot_mesg "Adding IPv4 address ${IP} to the ${1} interface..."
++ putlcd "Setting" "${1} IP - ${IP}"
+ ip addr add ${args} dev ${1}
+ evaluate_retval
+
+@@ -59,6 +60,7 @@
+ echo_warning
+ else
+ boot_mesg "Setting up default gateway..."
++ putlcd "Setting up" "default gateway"
+ ip route add default via ${GATEWAY} dev ${1}
+ evaluate_retval
+ fi
+@@ -66,13 +68,15 @@
+ ;;
+
+ down)
+- if [ -n "${GATEWAY}" ]; then
++ if [ -n "${GATEWAY}" ]; then
+ boot_mesg "Removing default gateway..."
++ putlcd "Removing" "default gateway"
+ ip route del default
+ evaluate_retval
+ fi
+
+ boot_mesg "Removing IPv4 address ${IP} from the ${1}
interface..."
++ putlcd "Unsetting" "${1} IP - ${IP}"
+ ip addr del ${args} dev ${1}
+ evaluate_retval
+ ;;
+diff -Naur
bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route
bootscripts.raq2/lfs/sysconfig/network-devices/services/ipv4-static-route
+--- bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route
2005-03-18 08:44:36.000000000 -0800
++++ bootscripts.raq2/lfs/sysconfig/network-devices/services/ipv4-static-route
2005-03-18 08:49:41.000000000 -0800
+@@ -63,7 +63,7 @@
+ fi
+
+ if [ -n "${need_gateway}" ]; then
+- if [ -z "${GATEWAY}" ]; then
++ if [ -z "${GATEWAY}" ]; then
+ boot_mesg "GATEWAY variable missing from ${IFCONFIG}, cannot
continue." ${FAILURE}
+ echo_failure
+ exit 1
+@@ -74,12 +74,14 @@
+ case "${2}" in
+ up)
+ boot_mesg "Adding '${desc}' route to the ${1} interface..."
++ putlcd "Adding route" "${desc}"
+ ip route add ${args} dev ${1}
+ evaluate_retval
+ ;;
+
+ down)
+ boot_mesg "Removing '${desc}' route from the ${1} interface..."
++ putlcd "Removing route" "${desc}"
+ ip route del ${args} dev ${1}
+ evaluate_retval
+ ;;
+diff -Naur bootscripts/Makefile bootscripts.raq2/Makefile
+--- bootscripts/Makefile 2005-03-19 08:17:55.285863936 -0800
++++ bootscripts.raq2/Makefile 2005-03-19 08:16:59.866288992 -0800
+@@ -29,6 +29,7 @@
+ 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/hotplug ${EXTDIR}/rc.d/init.d/
++ install -m ${MODE} lfs/init.d/laststart ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/modules ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/
+@@ -37,6 +38,7 @@
+ 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/sshd ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/setclock ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/syslog-ng ${EXTDIR}/rc.d/init.d/
+ install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/
+@@ -51,16 +53,27 @@
+ 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/sshd ${EXTDIR}/rc.d/rc1.d/K30sshd
++ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc1.d/S99laststart
+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc1.d/K80network
+ ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc1.d/K90syslog-ng
++ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc1.d/K30sshd
++ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc2.d/S99laststart
+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc2.d/K80network
+ ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc2.d/K90syslog-ng
++ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc3.d/S30sshd
+ ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc3.d/S10syslog-ng
++ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc3.d/S99laststart
+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network
++ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc4.d/S30sshd
+ ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc4.d/S10syslog-ng
++ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc4.d/S99laststart
+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network
++ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc5.d/S30sshd
+ ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc5.d/S10syslog-ng
++ ln -sf ../init.d/laststart ${EXTDIR}/rc.d/rc5.d/S99laststart
+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network
++ ln -sf ../init.d/sshd ${EXTDIR}/rc.d/rc6.d/K30sshd
+ ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network
+ ln -sf ../init.d/syslog-ng ${EXTDIR}/rc.d/rc6.d/K90syslog-ng
+ ln -sf ../init.d/hotplug ${EXTDIR}/rc.d/rc6.d/S50hotplug
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page