id:3:initdefault:
-si::sysinit:/etc/init.d/rc sysinit
+si::sysinit:/etc/init.d/rc S
l0:0:wait:/etc/init.d/rc 0
l1:S1:wait:/etc/init.d/rc 1
install -d -m 755 /etc/rc1.d
install -d -m 755 /etc/rc2.d
install -d -m 755 /etc/rc3.d
+ install -d -m 755 /etc/rc4.d
+ install -d -m 755 /etc/rc5.d
install -d -m 755 /etc/rc6.d
- install -d -m 755 /etc/rcsysinit.d
+ install -d -m 755 /etc/rcS.d
install -d -m 755 /etc/init.d
install -d -m 755 /etc/init.d/boottemp
install -d -m 755 /etc/sysconfig
install -m 644 $(DIR_APP)/lsb/manage-functions /lib/lsb/
install -m 644 $(DIR_APP)/etc/lsb-config /etc/lsb/
-# ln -svf ../init.d/network /etc/rc0.d/K80network
- ln -svf ../init.d/sysklogd /etc/rc0.d/K90sysklogd
- ln -svf ../init.d/sendsignals /etc/rc0.d/S60sendsignals
- ln -svf ../init.d/mountfs /etc/rc0.d/S70mountfs
- ln -svf ../init.d/swap /etc/rc0.d/S80swap
- ln -svf ../init.d/localnet /etc/rc0.d/S90localnet
- ln -svf ../init.d/halt /etc/rc0.d/S99halt
-
-# ln -svf ../init.d/network /etc/rc1.d/K80network
- ln -svf ../init.d/sysklogd /etc/rc1.d/K90sysklogd
-
-# ln -svf ../init.d/network /etc/rc2.d/K80network
- ln -svf ../init.d/sysklogd /etc/rc2.d/K90sysklogd
-
-# ln -svf ../init.d/network /etc/rc3.d/S20network
- ln -svf ../init.d/sysklogd /etc/rc3.d/S10sysklogd
-
-# ln -svf ../init.d/network /etc/rc6.d/K80network
- ln -svf ../init.d/sysklogd /etc/rc6.d/K90sysklogd
- ln -svf ../init.d/sendsignals /etc/rc6.d/S60sendsignals
- ln -svf ../init.d/mountfs /etc/rc6.d/S70mountfs
- ln -svf ../init.d/swap /etc/rc6.d/S80swap
- ln -svf ../init.d/localnet /etc/rc6.d/S90localnet
- ln -svf ../init.d/reboot /etc/rc6.d/S99reboot
-
- ln -svf ../init.d/mountkernfs /etc/rcsysinit.d/S00mountkernfs
- ln -svf ../init.d/sysctl /etc/rcsysinit.d/S05sysctl
- ln -svf ../init.d/modules /etc/rcsysinit.d/S10modules
- ln -svf ../init.d/udev /etc/rcsysinit.d/S15udev
- ln -svf ../init.d/swap /etc/rcsysinit.d/S20swap
- ln -svf ../init.d/setclock /etc/rcsysinit.d/S25setclock
- ln -svf ../init.d/checkfs /etc/rcsysinit.d/S30checkfs
- ln -svf ../init.d/mountfs /etc/rcsysinit.d/S40mountfs
- ln -svf ../init.d/udev_retry /etc/rcsysinit.d/S45udev_retry
- ln -svf ../init.d/cleanfs /etc/rcsysinit.d/S50cleanfs
- ln -svf ../init.d/console /etc/rcsysinit.d/S70console
- ln -svf ../init.d/localnet /etc/rcsysinit.d/S80localnet
+ cd /etc/init.d && find . -type f -exec install_initd {} \;
for i in $(DIR_SRC)/src/initscripts/sysconfig/*; do \
install -v -m 644 $$i /etc/sysconfig/; \
### BEGIN INIT INFO
# Provides: checkfs
# Required-Start: udev swap $time
-# Should-Start: lvm
+# Should-Start:
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Checks local filesystems before mounting.
# Description: Checks local filesystmes before mounting.
# Should-Start:
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Cleans temporary directories early in the boot process.
# Description: Cleans temporary directories /var/run, /var/lock, and
# Should-Start: $local_fs
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Sets up a localised console.
# Description: Sets up fonts and language settings for the user's
+++ /dev/null
-#!/bin/sh
-# Begin $rc_base/init.d/messagebus
-
-# Based on sysklogd script from LFS-3.1 and earlier.
-# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
-
-#$LastChangedBy: dnicholson $
-#$Date: 2007-10-21 11:33:30 -0500 (Sun, 21 Oct 2007) $
-
-. /etc/sysconfig/rc
-. $rc_functions
-
-pidfile=/var/run/dbus/pid
-socket=/var/run/dbus/system_bus_socket
-
-case "$1" in
- start)
- boot_mesg "Starting the D-Bus Messagebus Daemon..."
- /usr/bin/dbus-uuidgen --ensure
- loadproc -p "$pidfile" /usr/bin/dbus-daemon --system
- ;;
-
- stop)
- boot_mesg "Stopping the D-Bus Messagebus Daemon..."
- killproc -p "$pidfile" /usr/bin/dbus-daemon
- [ $? -eq 0 ] && rm -f "$socket"
- ;;
-
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
-
- status)
- statusproc -p $pidfile /usr/bin/dbus-daemon
- ;;
-
- *)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
- ;;
-esac
-
-# End $rc_base/init.d/messagebus
#!/bin/sh
-# Begin $rc_base/init.d/haldaemon
+# Begin /etc/init.d/haldaemon
-# Based on sysklogd script from LFS-3.1 and earlier.
-# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
+### BEGIN INIT INFO
+# Provides: haldaemon
+# Required-Start: messagebus
+# Should-Start: $syslog
+# Required-Stop: messagebus
+# Should-Stop: $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Hardware abstraction layer daemon.
+# Description: Starts the hardware abstraction layer daemon.
+### END INIT INFO
-#$LastChangedBy: dnicholson $
-#$Date: 2007-10-21 11:33:35 -0500 (Sun, 21 Oct 2007) $
+. /lib/lsb/init-functions
-. /etc/sysconfig/rc
-. $rc_functions
+MESSAGE="HAL Daemon"
+BIN_FILE="/usr/sbin/hald"
pidfile=/var/run/hald/pid
-case "$1" in
- start)
- boot_mesg "Starting the HAL Daemon..."
- loadproc -p $pidfile /usr/sbin/hald --use-syslog
- ;;
-
- stop)
- boot_mesg "Stopping the HAL Daemon..."
- killproc -p $pidfile /usr/sbin/hald
- ;;
-
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
-
- status)
- statusproc -p $pidfile /usr/sbin/hald
- ;;
-
- *)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
- ;;
+chk_stat
+
+case "${1}" in
+ start)
+ start_daemon -p ${pidfile} "${BIN_FILE}" --use-syslog
+ evaluate_retval start
+ ;;
+
+ stop)
+ killproc -p ${pidfile} "${BIN_FILE}"
+ evaluate_retval stop
+ ;;
+
+ force-reload)
+ reloadproc -force
+ evaluate_retval force-reload
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ status)
+ statusproc -p ${pidfile}
+ ;;
+
+ reload)
+ reloadproc
+ evaluate_retval reload
+ ;;
+
+ try-restart)
+ pidofproc "${BIN_FILE}" > /dev/null
+ if [ "${?}" -ne "0" ]; then
+ MESSAGE="${MESSAGE}: Not Running"
+ else
+ $0 stop
+ $0 start
+ exit 0
+ fi
+ evaluate_retval try-restart
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|{force-}reload|{try-}restart|status}"
+ exit 1
+ ;;
esac
-# End $rc_base/init.d/haldaemon
+# End /etc/init.d/haldaemon
# Provides: halt
# Required-Start:
# Should-Start:
-# Required-Stop: localnet
+# Required-Stop:
# Should-Stop:
# Default-Start: 0
# Default-Stop:
if [ "${STATUS}" = "0" ]; then
log_success_msg "Running with PID(s) ${pidlist}"
else
-
log_warning_msg "Not running!"
fi
echo "Usage: 'reloadproc BIN_FILE MESSAGE'"
exit 1 # Generic Error
fi
-
-
-
}
############################## evaluate_retval() ###############################
# Provides: localnet
# Required-Start: $local_fs
# Should-Start:
-# Required-Stop: $network
-# Should-Stop: swap
-# Default-Start: sysinit 0 6
-# Default-Stop:
+# Required-Stop:
+# Should-Stop:
+# Default-Start: S
+# Default-Stop: 0 6
# Short-Description: Starts the local network.
# Description: Sets the hostname of the machine and starts the
# loopback interface.
--- /dev/null
+#!/bin/sh
+# Begin /etc/init.d/messagebus
+
+### BEGIN INIT INFO
+# Provides: messagebus
+# Required-Start: $syslog
+# Should-Start:
+# Required-Stop: $syslog
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: Messagebus Daemon.
+# Description: Starts the dbus messagebus daemon.
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="D-Bus Messagebus Daemon"
+BIN_FILE="/usr/bin/dbus-daemon"
+
+pidfile=/var/run/dbus/pid
+socket=/var/run/dbus/system_bus_socket
+
+chk_stat
+
+case "${1}" in
+ start)
+ /usr/bin/dbus-uuidgen --ensure
+ start_daemon -p ${pidfile} "${BIN_FILE}" --system
+ evaluate_retval start
+ ;;
+
+ stop)
+ killproc -p ${pidfile} "${BIN_FILE}"
+ evaluate_retval stop
+ rm -f "$socket" 2>/dev/null
+ ;;
+
+ force-reload)
+ reloadproc -force
+ evaluate_retval force-reload
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ status)
+ statusproc -p ${pidfile}
+ ;;
+
+ reload)
+ reloadproc
+ evaluate_retval reload
+ ;;
+
+ try-restart)
+ pidofproc "${BIN_FILE}" > /dev/null
+ if [ "${?}" -ne "0" ]; then
+ MESSAGE="${MESSAGE}: Not Running"
+ else
+ $0 stop
+ $0 start
+ exit 0
+ fi
+ evaluate_retval try-restart
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|{force-}reload|{try-}restart|status}"
+ exit 1
+ ;;
+esac
+
+# End /etc/init.d/messagebus
### BEGIN INIT INFO
# Provides: modules
-# Required-Start: mountkernfs
-# Should-Start: sysctl
+# Required-Start: mountkernfs sysctl
+# Should-Start:
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Loads required modules.
# Description: Loads modules listed in /etc/sysconfig/modules.
### BEGIN INIT INFO
# Provides: $local_fs
# Required-Start: udev checkfs
-# Should-Start: lvm
-# Required-Stop: sendsignals
+# Should-Start:
+# Required-Stop: localnet
# Should-Stop:
-# Default-Start: sysinit 0 6
-# Default-Stop:
-# Short-Description: Mounts and unmounts all local filesystems.
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Mounts/unmounts local filesystems defined in /etc/fstab.
# Description: Remounts root filesystem read/write and mounts all
# remaining local filesystems defined in /etc/fstab on
# start. Remounts root filesystem read-only and unmounts
# Should-Start:
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Mounts /sys and /proc virtual (kernel) filesystems.
# Description: Mounts /sys and /proc virtual (kernel) filesystems.
### BEGIN INIT INFO
# Provides: $network
# Required-Start: $syslog
-# Should-Start:
-# Required-Stop:
-# Should-Stop: $remote_fs
+# Should-Start:
+# Required-Stop: $syslog $local_fs swap localnet
+# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts and configures network interfaces.
then
continue
fi
-
IN_BOOT=1 ${NETWORK_DEVICES}/ifup ${interface}
done
;;
fi
# Do not use the RUNLEVEL and PREVLEVEL variables provided by init so
-# that they can be modified and alternate directories (sysinit) can
+# that they can be modified and alternate directories (S) can
# be used without affecting init
runlevel="${1}"
prevlevel="${PREVLEVEL}"
fi
# Mount a tmpfs to store boot accounting information
-if [ "${runlevel}" = "sysinit" -a "${TEMPFS_MOUNT}" != "" ]; then
+if [ "${runlevel}" = "S" -a "${TEMPFS_MOUNT}" != "" ]; then
mount -n -t tmpfs tmpfs "${TEMPFS_MOUNT}" -o mode=600
fi
# Provide an interactive prompt (if requested)
-if [ "${runlevel}" = "sysinit" -a "${iprompt}" = "yes" ]; then
+if [ "${runlevel}" = "S" -a "${iprompt}" = "yes" ]; then
# ash does not accept t and n flags for read
ls -l /bin/sh | grep "/ash"
if [ "${?}" -eq "0" ]; then
fi
# Source the interactive state file if it exists
-if [ "${runlevel}" != "sysinit" -a -f "${TEMPFS_MOUNT}/.interactive-start" ]; then
+if [ "${runlevel}" != "S" -a -f "${TEMPFS_MOUNT}/.interactive-start" ]; then
. "${TEMPFS_MOUNT}/.interactive-start"
fi
-# Prompt for interactive startup after completing sysinit
-if [ "${interactive}" = "I" -a "${runlevel}" != "sysinit" -a \
+# Prompt for interactive startup after completing S
+if [ "${interactive}" = "I" -a "${runlevel}" != "S" -a \
"${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
echo -n -e "Proceed with interactive starup of runlevel "
echo -n -e "${INFO}${runlevel}${NORMAL}?"
script=${link#$RC_BASE/rc$runlevel.d/K[0-9][0-9]}
prev_start=$RC_BASE/rc$prevlevel.d/S[0-9][0-9]$script
- sysinit_start=$RC_BASE/rcsysinit.d/S[0-9][0-9]$script
+ S_start=$RC_BASE/rcS.d/S[0-9][0-9]$script
if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
- if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]; then
+ if [ ! -f ${prev_start} ] && [ ! -f ${S_start} ]; then
echo -e -n "${WARNING}WARNING:\n\n${link} can't be"
echo -e "${WARNING} executed because it was not"
echo -e -n "${WARNING} not started in the previous"
# Strip apply time to the logs, strip out any color codes and dump
# the log to /var/log/boot.log
-if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != "sysinit" ]; then
+if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != "S" ]; then
# Remove any color codes from the temp log file
sed -i 's@\\033\[[0-9];[0-9][0-9]m@@g' "${TEMPFS_MOUNT}/.bootlog"
#Fix the time and hostname
BTIMESPEC=$(echo `date +"%b %d %T"` `hostname`)
sed -i "s@^bootlog:@${BTIMESPEC} bootlog:@" "${TEMPFS_MOUNT}/.bootlog"
- cat "${TEMPFS_MOUNT}/.bootlog" >> /var/log/boot.log
- rm -f "${TEMPFS_MOUNT}/.bootlog"
+ # Don't try and write in 0 and 6, this is a 'boot' log
+ if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
+ cat "${TEMPFS_MOUNT}/.bootlog" >> /var/log/boot.log
+ rm -f "${TEMPFS_MOUNT}/.bootlog"
+ fi
fi
# End $RC_BASE/init.d/rc
# Provides: reboot
# Required-Start:
# Should-Start:
-# Required-Stop: localnet
+# Required-Stop:
# Should-Stop:
# Default-Start: 6
# Default-Stop:
# Provides: sendsignals
# Required-Start:
# Should-Start:
-# Required-Stop: $syslog
+# Required-Stop: $local_fs swap localnet
# Should-Stop:
-# Default-Start: 0 6
-# Default-Stop:
+# Default-Start:
+# Default-Stop: 0 6
# Short-Description: Attempts to kill remaining processes.
# Description: Attempts to kill remaining processes.
# X-LFS-Default-Start:
### BEGIN INIT INFO
# Provides: $time
-# Required-Start: udev
+# Required-Start: modules
# Should-Start:
-# Required-Stop:
+# Required-Stop: $syslog
# Should-Stop:
-# Default-Start: sysinit
-# Default-Stop:
+# Default-Start: S
+# Default-Stop:
# Short-Description: Stores and restores time from the hardware clock
# Description: On boot, system time is obtained from hwclock. The
# hardware clock can also be set on shutdown.
# X-LFS-Default-Start: S25
-# X-LFS-Default-Stop:
-# X-LFS-Provided-By: LFS
+# X-LFS-Default-Stop: K46
+# X-LFS-Provided-By: LFS BLFS
### END INIT INFO
. /lib/lsb/init-functions
### BEGIN INIT INFO
# Provides: swap
-# Required-Start: mountkernfs udev
-# Should-Start: lvm
-# Required-Stop: $local_fs
+# Required-Start: modules
+# Should-Start:
+# Required-Stop: localnet
# Should-Stop:
-# Default-Start: sysinit 0 6
-# Default-Stop:
+# Default-Start: S
+# Default-Stop: 0 6
# Short-Description: Mounts and unmounts swap partitions.
# Description: Mounts and unmounts swap partitions defined in
# /etc/fstab.
### BEGIN INIT INFO
# Provides: sysctl
-# Required-Start: udev
+# Required-Start: mountkernfs
# Should-Start:
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Makes changes to the proc filesystem
# Description: Makes changes to the proc filesystem as defined in
# Provides: $syslog
# Required-Start: localnet
# Should-Start:
-# Required-Stop: $network
+# Required-Stop: $local_fs
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### BEGIN INIT INFO
# Provides: udev
-# Required-Start: mountkernfs
+# Required-Start: modules
# Should-Start:
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Populated /dev with device nodes.
# Description: Mounts a tempfs on /dev and starts the udevd daemon.
# Should-Start: $local_fs
# Required-Stop:
# Should-Stop:
-# Default-Start: sysinit
+# Default-Start: S
# Default-Stop:
# Short-Description: Replays failed uevents and creates additonal devices.
# Description: Replays any failed uevents that were skipped due to