aboutsummaryrefslogtreecommitdiffstats
path: root/lsb-bootscripts/etc/init.d
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2012-08-29 20:45:23 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2012-08-29 20:45:23 +0000
commitcb02946abfe632bc90f1eaa302b2d8d4eb73e5c9 (patch)
tree0a19838c2a1d6b59f976c3138554eb4963bf1903 /lsb-bootscripts/etc/init.d
parentd7f2eb08dab7e6dd88df0102ec48dce0a301dc5f (diff)
Lots of spelling fixes.
Delete the no longer used lsb-bootscripts directory git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9967 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'lsb-bootscripts/etc/init.d')
-rw-r--r--lsb-bootscripts/etc/init.d/checkfs103
-rw-r--r--lsb-bootscripts/etc/init.d/cleanfs105
-rw-r--r--lsb-bootscripts/etc/init.d/console96
-rw-r--r--lsb-bootscripts/etc/init.d/halt30
-rw-r--r--lsb-bootscripts/etc/init.d/localnet81
-rw-r--r--lsb-bootscripts/etc/init.d/modules97
-rw-r--r--lsb-bootscripts/etc/init.d/mountfs59
-rw-r--r--lsb-bootscripts/etc/init.d/mountvirtfs47
-rw-r--r--lsb-bootscripts/etc/init.d/network84
-rw-r--r--lsb-bootscripts/etc/init.d/rc201
-rw-r--r--lsb-bootscripts/etc/init.d/reboot32
-rw-r--r--lsb-bootscripts/etc/init.d/sendsignals54
-rw-r--r--lsb-bootscripts/etc/init.d/setclock54
-rw-r--r--lsb-bootscripts/etc/init.d/swap55
-rw-r--r--lsb-bootscripts/etc/init.d/sysctl39
-rw-r--r--lsb-bootscripts/etc/init.d/sysklogd69
-rw-r--r--lsb-bootscripts/etc/init.d/template90
-rw-r--r--lsb-bootscripts/etc/init.d/udev90
-rw-r--r--lsb-bootscripts/etc/init.d/udev_retry49
19 files changed, 0 insertions, 1435 deletions
diff --git a/lsb-bootscripts/etc/init.d/checkfs b/lsb-bootscripts/etc/init.d/checkfs
deleted file mode 100644
index ade693577..000000000
--- a/lsb-bootscripts/etc/init.d/checkfs
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/checkfs
-
-### BEGIN INIT INFO
-# Provides: checkfs
-# Required-Start: udev swap
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Checks local filesystems before mounting.
-# Description: Checks local filesystmes before mounting.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- if [ -f /fastboot ]; then
- echo "${INFO}/fastboot found!"
- log_success_msg "Will not perform file system checks as requested."
- exit 0
- fi
-
- mount -n -o remount,ro / >/dev/null
- if [ ${?} -ne 0 ]
- then
- log_failure_msg "Mounting root file system in read-only mode"
- echo -e "${FAILURE}FAILURE:\n"
- echo -e -n "${FAILURE}Cannot check root filesystem because it "
- echo -e "${FAILURE}could not be mounted"
- echo -e "${FAILURE}in read-only mode.\n\n"
- echo -e -n "${FAILURE}After you press Enter, this system will be "
- echo -e "${FAILURE}halted and powered off.\n"
- echo -e "${INFO}Press enter to continue...${NORMAL}"
- $FAILURE_ACTION
- /etc/rc.d/init.d/halt stop
- fi
-
- if [ -f /forcefsck ]
- then
- echo "${INFO}/forcefsck found!"
- log_success_msg "${INFO}Forcing file system checks as requested."
- options="-f"
- else
- options=""
- fi
-
- # 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}" -eq 0 ]
- then
- log_success_msg "Checking file systems..."
- elif [ "${error_value}" -eq 1 ]
- then
- log_warning_msg "Checking file systems..."
- echo -e "${WARNING}WARNING:\n"
- echo -e "${WARNING}File system errors were found and have been"
- echo -e "${WARNING}corrected. You may want to double-check that"
- echo -e "${WARNING}everything was fixed properly.${NORMAL}"
- elif [ "${error_value}" -eq 2 -o "${error_value}" -eq 3 ]; then
- log_warning_msg "Checking file systems..."
- echo -e "${WARNING}WARNING:\n"
- echo -e "${WARNING}File system errors were found and have been been"
- echo -e "${WARNING}corrected, but the nature of the errors require"
- echo -e "${WARNING}this system to be rebooted.\n"
- echo -e "After you press enter, this system will be rebooted.\n"
- echo -e "${INFO}Press Enter to continue...${NORMAL}"
- $FAILURE_ACTION
- reboot -f
- elif [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then
- log_failure_msg "Checking file systems..."
- echo -e "${FAILURE}FAILURE:\n"
- echo -e "${FAILURE}File system errors were encountered that could"
- echo -e "${FAILURE}not be fixed automatically. This system cannot"
- echo -e "${FAILURE}continue to boot and will therefore be halted"
- echo -e "${FAILURE}until those errors are fixed manually by a"
- echo -e "${FAILURE}System Administrator.\n"
- echo -e "${FAILURE}After you press Enter, this system will be"
- echo -e "${FAILURE}halted and powered off.\n"
- echo -e "${INFO}Press Enter to continue...${NORMAL}"
- $FAILURE_ACTION
- /etc/rc.d/init.d/halt stop
- elif [ "${error_value}" -ge 16 ]; then
- log_failure_msg "Checking file systems..."
- echo -e "${FAILURE}FAILURE:\n"
- echo -e "${FAILURE}Unexpected Failure running fsck. Exited with error"
- echo -e "${FAILURE}code: ${error_value}.${NORMAL}"
- exit ${error_value}
- fi
- ;;
- *)
- echo "Usage: ${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/checkfs
diff --git a/lsb-bootscripts/etc/init.d/cleanfs b/lsb-bootscripts/etc/init.d/cleanfs
deleted file mode 100644
index b455d3fd9..000000000
--- a/lsb-bootscripts/etc/init.d/cleanfs
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/cleanfs
-
-### BEGIN INIT INFO
-# Provides: cleanfs
-# Required-Start: $local_fs
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Cleans and prepares the temporary directory.
-# Description: Cleans the temporary directory /tmp and creates the
-# /var/run/utmp file and any other files defined in
-# /etc/default/createfiles.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-# Function to create files/directory on boot.
-create_files()
-{
- # Read in the configuration file.
- exec 9>&0 < /etc/default/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
- ;;
- *)
- echo -e -n "\n${WARNING}Unknown device type: ${dtype}"
- echo -e "${NORMAL}"
- ;;
- esac
- ;;
- *)
- echo -e "\n${WARNING}Unknown type: ${type}${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)
- message="Cleaning file systems: "
-
- message="${message}${INFO} /tmp"
- find /tmp -xdev -mindepth 1 ! -name lost+found \
- -delete || 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 standard
-
- if egrep -qv '^(#|$)' /etc/default/createfiles 2>/dev/null
- then
- message="Creating files and directories..."
- create_files
- evaluate_retval standard
- fi
- ;;
- *)
- echo "Usage: ${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/cleanfs
diff --git a/lsb-bootscripts/etc/init.d/console b/lsb-bootscripts/etc/init.d/console
deleted file mode 100644
index f25630d0e..000000000
--- a/lsb-bootscripts/etc/init.d/console
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/console
-
-### BEGIN INIT INFO
-# Provides: console
-# Required-Start:
-# Should-Start: $local_fs
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Sets up a localised console.
-# Description: Sets up fonts and language settings for the user's
-# local as defined by /etc/default/console.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-MESSAGE="Setting up Linux console..."
-
-# Native English speakers probably don't have /etc/default/console at all
-if [ -f /etc/default/console ]
-then
- . /etc/default/console
-fi
-
-is_true() {
- [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
-}
-
-failed=0
-
-case "${1}" in
- start)
- # 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 standard
- ;;
- *)
- echo $"Usage:" "${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/console
diff --git a/lsb-bootscripts/etc/init.d/halt b/lsb-bootscripts/etc/init.d/halt
deleted file mode 100644
index 281e5aff5..000000000
--- a/lsb-bootscripts/etc/init.d/halt
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/halt
-
-### BEGIN INIT INFO
-# Provides: halt
-# Required-Start:
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: 0
-# Default-Stop:
-# Short-Description: Halts the system.
-# Description: Halts the System.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- stop)
- log_success_msg "Halting System..."
- halt -d -f -i -p
- ;;
- *)
- echo "Usage: {stop}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/halt
diff --git a/lsb-bootscripts/etc/init.d/localnet b/lsb-bootscripts/etc/init.d/localnet
deleted file mode 100644
index cb682e649..000000000
--- a/lsb-bootscripts/etc/init.d/localnet
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/localnet
-
-### BEGIN INIT INFO
-# Provides: localnet
-# Required-Start: $local_fs
-# Should-Start:
-# 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.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- ip addr add 127.0.0.1/8 label lo dev lo
- ip link set lo up
- if [ "${?}" -eq "0" ]
- then
- log_success_msg "Bringing up the loopback interface..."
- else
- log_failure_msg "Bringing up the loopback interface..."
- fi
-
- hostname "${HOSTNAME}"
- if [ "${?}" -eq "0" ]
- then
- log_success_msg "Setting hostname to ${HOSTNAME}..."
- else
- log_failure_msg "Setting hostname to ${HOSTNAME}..."
- fi
-
- ;;
-
- stop)
- ip link set lo down
- if [ "${?}" -eq "0" ]
- then
- log_success_msg "Bringing down the loopback interface..."
- else
- log_failure_msg "Bringing down the loopback interface..."
- fi
-
- ;;
-
- restart)
- ip link set lo down
- retval="${?}"
- sleep 1
- ip addr add 127.0.0.1/8 label lo dev lo
- retval=$(( "${retval}" + "${?}" ))
- ip link set lo up
- retval=$(( "${retval}" + "${?}" ))
- hostname "${HOSTNAME}"
- retval=$(( "${retval}" + "${?}" ))
- if [ "${retval}" -eq "0" ]
- then
- log_success_msg "Restarting local network..."
- else
- log_failure_msg "Restarting local network..."
- fi
- ;;
-
- status)
- log_success_msg "Hostname is: ${INFO}$(hostname)${NORMAL}"
- ip link show lo
- ;;
-
- *)
- echo "Usage: ${0} {start|stop|restart|status}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/localnet
diff --git a/lsb-bootscripts/etc/init.d/modules b/lsb-bootscripts/etc/init.d/modules
deleted file mode 100644
index d173c7727..000000000
--- a/lsb-bootscripts/etc/init.d/modules
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/modules
-
-### BEGIN INIT INFO
-# Provides: modules
-# Required-Start: mountvirtfs sysctl
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Loads required modules.
-# Description: Loads modules listed in /etc/default/modules.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-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/default/modules ] &&
- egrep -qv '^($|#)' /etc/default/modules ||
- exit 0
-
- # If proc is mounted, find the current kernel
- # message level
- if [ -f /proc/sys/kernel/printk ]; then
- prev_msg=`cat /proc/sys/kernel/printk | \
- sed 'l 1' | sed -n '2~0p' | \
- sed 's/\\\//'`
- else
- prev_msg="6"
- fi
-
- # Now set the message level to 1 so not to make too
- # much noise when loading modules
- dmesg -n 1
-
- # Only try to load modules if the user has actually given us
- # some modules to load.
- if egrep -qv '^(#|$)' /etc/default/modules 2>/dev/null
- then
-
- # Read in the configuration file.
- exec 9>&0 < /etc/default/modules
-
- message="${INFO}Loading modules:"
-
- 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
- message="${message}${NORMAL} ${module}"
- else
- failedmod="${failedmod} ${module}"
- fi
- done
-
- # Print a message about successfully loaded
- # modules on the correct line.
- log_success_msg "${message}"
-
- # Print a failure message with a list of any
- # modules that may have failed to load.
- if [ "${failedmod}" ]; then
- log_failure_msg "${FAILURE}Failed to load modules:${failedmod}"
- fi
-
- exec 0>&9 9>&-
-
- fi
- # Set the kernel message level back to it's previous value.
- dmesg -n "${prev_msg}"
- ;;
- *)
- echo "Usage: ${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/modules
diff --git a/lsb-bootscripts/etc/init.d/mountfs b/lsb-bootscripts/etc/init.d/mountfs
deleted file mode 100644
index 578cb140a..000000000
--- a/lsb-bootscripts/etc/init.d/mountfs
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/mountfs
-
-### BEGIN INIT INFO
-# Provides: $local_fs
-# Required-Start: udev checkfs
-# Should-Start:
-# Required-Stop: swap
-# Should-Stop:
-# 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
-# remaining filesystems on stop.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- message="Remounting root file system in read-write mode..."
- mount -n -o remount,rw / >/dev/null
- evaluate_retval standard
-
- # Remove fsck-related file system watermarks.
- rm -f /fastboot /forcefsck
-
- message="Recording existing mounts in /etc/mtab..."
- > /etc/mtab
- mount -f / || failed=1
- mount -f /proc || failed=1
- mount -f /sys || failed=1
- mount -f /run || failed=1
- (exit ${failed})
- evaluate_retval standard
-
- # This will mount all filesystems that do not have _netdev in
- # their option list. _netdev denotes a network filesystem.
- message="Mounting remaining file systems..."
- mount -a -O no_netdev >/dev/null
- evaluate_retval standard
- ;;
-
- stop)
- message="Unmounting all other currently mounted file systems..."
- umount -a -d -r >/dev/null
- evaluate_retval standard
- ;;
-
- *)
- echo "Usage: ${0} {start|stop}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/mountfs
diff --git a/lsb-bootscripts/etc/init.d/mountvirtfs b/lsb-bootscripts/etc/init.d/mountvirtfs
deleted file mode 100644
index d7d1b887c..000000000
--- a/lsb-bootscripts/etc/init.d/mountvirtfs
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/mountvirtfs
-
-### BEGIN INIT INFO
-# Provides: mountvirtfs
-# Required-Start:
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Mounts /sys, /proc, and /run virtual (kernel) filesystems.
-# Description: Mounts /sys, /proc, and run virtual (kernel) filesystems.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- message="Mounting virtual file systems:"
-
- if ! mountpoint /proc > /dev/null; then
- message="${message}${INFO} /proc${NORMAL}"
- mount -n /proc || failed=1
- fi
-
- if ! mountpoint /sys > /dev/null; then
- message="${message}${INFO} /sys${NORMAL}"
- mount -n /sys || failed=1
- fi
-
- # create needed directories in /run
- mkdir /run/{var,lock,shm} || failed=1
- chmod 1777 /run/shm
-
- (exit ${failed})
- evaluate_retval standard
- ;;
-
- *)
- echo "Usage: ${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/mountvirtfs
diff --git a/lsb-bootscripts/etc/init.d/network b/lsb-bootscripts/etc/init.d/network
deleted file mode 100644
index ddd130391..000000000
--- a/lsb-bootscripts/etc/init.d/network
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/network
-
-### BEGIN INIT INFO
-# Provides: $network
-# Required-Start: $local_fs swap localnet
-# Should-Start: $syslog
-# Required-Stop: $local_fs swap localnet
-# Should-Stop: $syslog
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 2 6
-# Short-Description: Starts and configures network interfaces.
-# Description: Starts and configures network interfaces.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- # Start all network interfaces
- for dir in ${NETWORK_DEVICES}/ifconfig.*
- do
- interface=${dir##*/ifconfig.}
- # skip if $dir is * (because nothing was found)
- if [ "${interface}" = "*" ]; then
- continue
- fi
- # Process individual configuration files
- for file in "${dir}"/* ; do
- ONBOOT=`grep "ONBOOT" "${file}" | sed 's@^ONBOOT=@@'`
- case "${ONBOOT}" in
- Y* | y* | 0)
- /sbin/ifup -c "${file}" "${interface}"
- ;;
- esac
- done
- done
- ;;
-
- stop)
- # Reverse list
- DIRS=""
- for dir in /run/network/ifconfig.*
- do
- DIRS="${dir} ${DIRS}"
- done
-
- # Stop all network interfaces
- for dir in ${DIRS}; do
- interface=${dir##*/ifconfig.}
- # skip if $dir is * (because nothing was found)
- if [ "${interface}" = "*" ]; then
- continue
- fi
- # Process individual configuration files
- for file in "${dir}"/* ; do
- # No checking necessary if it is in /run/network
- /sbin/ifdown -c "${file}" "${interface}"
- done
- link_status=`/sbin/ip link show "${interface}" | \
- grep -o "state DOWN"`
- if [ "${link_status}" != "state DOWN" ]; then
- message="Shutting down the ${interface} interface..."
- /sbin/ip addr flush "${interface}" &&
- /sbin/ip link set "${interface}" down
- evaluate_retval standard
- fi
- done
- ;;
-
- restart)
- ${0} stop
- sleep 1
- ${0} start
- ;;
-
- *)
- echo "Usage: ${0} {start|stop|restart}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/network
diff --git a/lsb-bootscripts/etc/init.d/rc b/lsb-bootscripts/etc/init.d/rc
deleted file mode 100644
index edad963a5..000000000
--- a/lsb-bootscripts/etc/init.d/rc
+++ /dev/null
@@ -1,201 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/rc
-
-# Get the configuration file
-# All changes are to occur in the config file
-. /etc/default/rc
-
-# These 3 signals will not cause our script to exit
-trap "" INT QUIT TSTP
-
-# Simple sanity check - rc only takes one argument
-if [ "${#}" -ne 1 ]; then
- echo "Usage: ${0} <runlevel>" >&2
- exit 1
-fi
-
-# Do not use the RUNLEVEL and PREVLEVEL variables provided by init so
-# that they can be modified and alternate directories (S) can
-# be used without affecting init
-runlevel="${1}"
-prevlevel="${PREVLEVEL}"
-
-# Just in case - some flavors of init don't set PREVLEVEL to 'N'
-if [ "${prevlevel}" = "" ]; then
- prevlevel="N"
-fi
-
-# Mount /run
-if [ "${runlevel}" = "S" ]; then
- mount -n -t tmpfs tmpfs /run
-fi
-
-# Provide an interactive prompt (if requested)
-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
- # We are using ash
- echo -e -n "${WARNING}WARNING: Either bash or zsh is required"
- echo -e "${WARNING} for interactive startup.\n"
- sleep 3
- else
- echo ""
- # dcol and icol are spaces before the message to center the
- # message on screen.
- dcol=$(( $(( ${COLUMNS} - ${dlen} )) / 2 ))
- icol=$(( $(( ${COLUMNS} - ${ilen} )) / 2 ))
- echo -e "\\033[${dcol}G${welcome_message}"
- echo -e "\\033[${icol}G${i_message}${NORMAL}"
- echo ""
- read -t "${itime}" -n 1 interactive 2>&1 > /dev/null
- if [ "${interactive}" = "I" -o "${interactive}" = "i" ]; then
- echo -n -e "${CURS_UP}"
- echo -e "${INFO}Interactive boot selected...${NORMAL}"
- echo "interactive=I" > /run/.interactive-start
- fi
- fi
-fi
-
-
-# Verify that the directory exists
-if [ ! -d "${RC_BASE}/rc${runlevel}.d" ]; then
- echo -n -e "${WARNING}${RC_BASE}/rc${runlevel}.d does not exist."
- echo -e "${NORMAL}"
- exit 1
-fi
-
-# Source the interactive state file if it exists
-if [ "${runlevel}" != "S" -a -f /run/.interactive-start ]; then
- . /run/.interactive-start
-fi
-
-# 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}?"
- echo -n -e "(${FAILURE}y${NORMAL})es/(${FAILURE}n${NORMAL})o "
- read -n 1 go_on
- echo ""
- if [ "${go_on}" = "n" ]; then
- # don't continue
- exit 0
- fi
-fi
-
-
-# Attempt to stop all services started in the previous runlevel,
-# that are stopped in this runlevel
-if [ "${prevlevel}" != "N" ]; then
- for link in $(ls -v ${RC_BASE}/rc${runlevel}.d/K* 2> /dev/null)
- do
- # Check to see if link is a valid symlink
- if [ ! -f ${link} ]; then
- echo -e "${WARNING}${link} is not a valid symlink."
- continue # go on to the next K* link
- fi
-
- # Check to see if link is executable
- if [ ! -x ${link} ]; then
- echo -e "${WARNING}${link} is not executable, skipping."
- continue # go on to the next K* link
- fi
-
- 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
- S_start=$RC_BASE/rcS.d/S[0-9][0-9]$script
-
- if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; 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"
- echo -e "${WARNING} runlevel (${prevlevel})."
- echo -e "${NORMAL}"
- continue
- fi
- fi
- ${link} stop
- error_value=${?}
-
- if [ "${error_value}" -ne "0" ]; then
- print_error_msg
- fi
- done
-fi
-
-# Start all functions in this runlevel if they weren't started in
-# the previous runlevel
-for link in $(ls -v ${RC_BASE}/rc${runlevel}.d/S* 2> /dev/null)
-do
- if [ "${prevlevel}" != "N" ]; then
- script=${link#$RC_BASE/rc$runlevel.d/S[0-9][0-9]}
- stop=$RC_BASE/rc$runlevel.d/K[0-9][0-9]$script
- prev_start=$RC_BASE/rc$prevlevel.d/S[0-9][0-9]$script
-
- [ -f ${prev_start} ] && [ ! -f ${stop} ] && continue
- fi
-
- # Check to see if link is a valid symlink
- if [ ! -f ${link} ]; then
- echo -e "${WARNING}${link} is not a valid symlink."
- continue # go on to the next K* link
- fi
-
- # Check to see if link is executable
- if [ ! -x ${link} ]; then
- echo -e "${WARNING}${link} is not executable, skipping."
- continue # go on to the next K* link
- fi
-
- case ${runlevel} in
- 0|6)
- ${link} stop
- ;;
-
- *)
- if [ "${interactive}" = "I" -o "${interactive}" = "i" ]; then
- echo -e -n "${WARNING}Start ${INFO}${link} ${WARNING}?"
- echo -e -n "${NORMAL}(${FAILURE}y${NORMAL})es/(${FAILURE}n${NORMAL})o "
- read -n 1 startit 2>&1 > /dev/null
- echo ""
- if [ "${startit}" = "y" -o "${startit}" = "Y" ]; then
- ${link} start
- else
- echo -e -n "${WARNING}Not starting ${INFO}${link}"
- echo -e "${WARNING}.${NORMAL}\n"
- fi
- else
- ${link} start
- fi
- ;;
- esac
- error_value=${?}
-
- if [ "${error_value}" -gt "1" ]; then
- print_error_msg
- fi
-done
-
-# Strip apply time to the logs, strip out any color codes and dump
-# the log to /var/log/boot.log
-if [ -f /run/.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' /run/.bootlog
- #Fix the time and hostname
- BTIMESPEC=$(echo `date +"%b %d %T"` `hostname`)
- sed -i "s@^bootlog:@${BTIMESPEC} bootlog:@" /run/.bootlog
- # Don't try and write in 0 and 6, this is a 'boot' log
- if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
- cat /run/.bootlog >> /var/log/boot.log
- rm -f /run/.bootlog
- fi
-fi
-
-# Remove interactive boot temp file
-if [ -f /run/.interactive-start -a "${runlevel}" != "S" ]; then
- rm -f /run/.interactive-start
-fi
-
-# End $RC_BASE/init.d/rc
diff --git a/lsb-bootscripts/etc/init.d/reboot b/lsb-bootscripts/etc/init.d/reboot
deleted file mode 100644
index d7c33cef1..000000000
--- a/lsb-bootscripts/etc/init.d/reboot
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/reboot
-
-### BEGIN INIT INFO
-# Provides: reboot
-# Required-Start:
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: 6
-# Default-Stop:
-# Short-Description: Reboots the system.
-# Description: Reboots the System.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- stop)
- log_success_msg "Restarting system..."
- reboot -d -f -i
- ;;
-
- *)
- echo "Usage: ${0} {stop}"
- exit 1
- ;;
-
-esac
-
-# End $RC_BASE/init.d/reboot
diff --git a/lsb-bootscripts/etc/init.d/sendsignals b/lsb-bootscripts/etc/init.d/sendsignals
deleted file mode 100644
index a09c7b0e2..000000000
--- a/lsb-bootscripts/etc/init.d/sendsignals
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/sendsignals
-
-### BEGIN INIT INFO
-# Provides: sendsignals
-# Required-Start:
-# Should-Start:
-# Required-Stop: $local_fs swap localnet
-# Should-Stop:
-# Default-Start:
-# Default-Stop: 0 6
-# Short-Description: Attempts to kill remaining processes.
-# Description: Attempts to kill remaining processes.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- stop)
- message="Sending all processes the TERM signal..."
- killall5 -15
- error_value=${?}
- # Account for successful return value of 2
- if [ ${error_value} -eq 2 ]; then
- error_value=0
- fi
- sleep 3
-
- (exit ${error_value})
- evaluate_retval standard
-
- message="Sending all processes the KILL signal..."
- killall5 -9
- error_value=${?}
- # Account for successful return value of 2
- if [ ${error_value} -eq 2 ]; then
- error_value=0
- fi
-
- sleep 3
-
- (exit ${error_value})
- evaluate_retval standard
- ;;
-
- *)
- echo "Usage: ${0} {stop}"
- exit 1
- ;;
-
-esac
-
-# End $RC_BASE/init.d/sendsignals
diff --git a/lsb-bootscripts/etc/init.d/setclock b/lsb-bootscripts/etc/init.d/setclock
deleted file mode 100644
index ab13e62c7..000000000
--- a/lsb-bootscripts/etc/init.d/setclock
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/setclock
-
-### BEGIN INIT INFO
-# Provides: hwclock
-# Required-Start:
-# Should-Start: modules
-# Required-Stop:
-# Should-Stop: $syslog
-# Default-Start:
-# 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-Provided-By: LFS BLFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-BIN_FILE="/sbin/hwclock"
-
-chk_stat
-
-case "${UTC}" in
- yes|true|1)
- CLOCKPARAMS="${CLOCKPARAMS} --utc"
- ;;
-
- no|false|0)
- CLOCKPARAMS="${CLOCKPARAMS} --localtime"
- ;;
-
-esac
-
-case ${1} in
- start)
- message="Setting system clock..."
- ${BIN_FILE} --hctosys ${CLOCKPARAMS} >/dev/null
- evaluate_retval standard
- ;;
-
- stop)
- message="Setting hardware clock..."
- ${BIN_FILE} --systohc ${CLOCKPARAMS} >/dev/null
- evaluate_retval standard
- ;;
-
- *)
- echo "Usage: ${0} {start|stop}"
- ;;
-
-esac
-
-# End $RC_BASE/init.d/setclock
diff --git a/lsb-bootscripts/etc/init.d/swap b/lsb-bootscripts/etc/init.d/swap
deleted file mode 100644
index 7f74ec718..000000000
--- a/lsb-bootscripts/etc/init.d/swap
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/swap
-
-### BEGIN INIT INFO
-# Provides: swap
-# Required-Start: udev
-# Should-Start: modules
-# Required-Stop: localnet
-# Should-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.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- message="Activating all swap files/partitions..."
- swapon -a
- evaluate_retval standard
- ;;
-
- stop)
- message="Deactivating all swap files/partitions..."
- swapoff -a
- evaluate_retval standard
- ;;
-
- restart)
- swapoff -a
- error_level="${?}"
- sleep 1
- swapon -a
- error_level="$(( ${error_level} + ${?} ))"
- (exit "${error_level}")
- evaluate_retval restart
- ;;
-
- status)
- log_success_msg "Retrieving swap status..."
- echo
- swapon -s
- ;;
-
- *)
- echo "Usage: ${0} {start|stop|restart|status}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/swap
diff --git a/lsb-bootscripts/etc/init.d/sysctl b/lsb-bootscripts/etc/init.d/sysctl
deleted file mode 100644
index 8adea506e..000000000
--- a/lsb-bootscripts/etc/init.d/sysctl
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/sysctl
-
-### BEGIN INIT INFO
-# Provides: sysctl
-# Required-Start: mountvirtfs
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Makes changes to the proc filesystem
-# Description: Makes changes to the proc filesystem as defined in
-# /etc/sysctl.conf. See 'man sysctl(8)'.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- if [ -f "/etc/sysctl.conf" ]; then
- message="Setting kernel runtime parameters..."
- sysctl -q -p
- evaluate_retval standard
- fi
- ;;
-
- status)
- sysctl -a
- ;;
-
- *)
- echo "Usage: ${0} {start|status}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/sysctl
diff --git a/lsb-bootscripts/etc/init.d/sysklogd b/lsb-bootscripts/etc/init.d/sysklogd
deleted file mode 100644
index 0b5113779..000000000
--- a/lsb-bootscripts/etc/init.d/sysklogd
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/sysklogd
-
-### BEGIN INIT INFO
-# Provides: $syslog
-# Required-Start: localnet
-# Should-Start:
-# Required-Stop: $local_fs sendsignals
-# Should-Stop:
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Starts kernel and system log daemons.
-# Description: Starts kernel and system log daemons.
-# /etc/fstab.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-case "${1}" in
- start)
- MESSAGE="system log daemon..."
- start_daemon /sbin/syslogd -m 0
- evaluate_retval start
-
- MESSAGE="kernel log daemon..."
- start_daemon /sbin/klogd
- evaluate_retval start
- ;;
-
- stop)
- MESSAGE="kernel log daemon..."
- killproc /sbin/klogd
- evaluate_retval stop
-
- MESSAGE="system log daemon..."
- killproc /sbin/syslogd
- evaluate_retval stop
- ;;
-
- force-reload)
- MESSAGE="system log daemon config file..."
- killproc -HUP `/sbin/syslogd`
- evaluate_retval reload
- ;;
-
- restart)
- MESSAGE="system and kernel log deamons..."
- failed=0
- killproc /sbin/klogd || failed=1
- killproc /sbin/syslogd || failed=1
- start_daemon /sbin/syslogd -m 0 || failed=1
- start_daemon /sbin/klogd || failed=1
- (exit ${failed})
- evaluate_retval restart
- ;;
-
- status)
- statusproc /sbin/syslogd
- statusproc /sbin/klogd
- ;;
-
- *)
- echo "Usage: ${0} {start|stop|force-reload|restart|status}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/sysklogd
diff --git a/lsb-bootscripts/etc/init.d/template b/lsb-bootscripts/etc/init.d/template
deleted file mode 100644
index 4d4cf8c7b..000000000
--- a/lsb-bootscripts/etc/init.d/template
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/template
-
-### BEGIN INIT INFO
-# Provides: template
-# Required-Start:
-# Should-Start:
-# Required-Stop:
-# Should-Stop:
-# Default-Start:
-# Default-Stop:
-# Short-Description:
-# Description:
-# X-LFS-Provided-By:
-### END INIT INFO
-
-# Source the LSB init-functions, ours are pulled in from there.
-. /lib/lsb/init-functions
-
-# These are optional, but required for chk_stat. They will be used in
-# the rest of the functions if defined, else you must provide a program
-# name to control, and a message ('Starting Template Service...'
-# or 'Stoping Template Service...') to evauate_retval. See the
-# documentaion in the lfs-fucntions file for more information.
-MESSAGE="Template Service"
-BIN_FILE="/some/path/to/template"
-CONFIGFILE="/etc/default/template.conf"
-
-# check that $BIN_FILE exists and is executable, and $CONFIGFILE exists.
-chk_stat
-
-# LSB Defined functions require that at least $BIN_FILE be passed to them,
-# where as lfs-functions will use the $BIN_FILE environment variable.
-# loadproc() and endproc() are just wrappers that pass everything on to
-# the LSB defined functions.
-
-case "${1}" in
- start)
- #start_daemon "${BIN_FILE}" -arg1 -arg2 #... or:
- loadproc -arg1 -arg2 -arg3 #...
- evaluate_retval start
- ;;
-
- stop)
- #killproc -TERM "${BIN_FILE}" or:
- endproc
- evaluate_retval stop
- ;;
-
- force-reload)
- reloadproc -force
- evaluate_retval force-reload
- ;;
-
- restart)
- $0 stop
- $0 start
- ;;
-
- status)
- statusproc
- ;;
-
-# reload and try-restart are optional per LSB requirements
- reload)
- reloadproc
- evaluate_retval reload
- ;;
-
- try-restart)
- # Since this is optional there is no lfs-function for this one...
- # might be at a later time if used enough, but I doubt it usefullness.
- 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/template
diff --git a/lsb-bootscripts/etc/init.d/udev b/lsb-bootscripts/etc/init.d/udev
deleted file mode 100644
index bd23f8cee..000000000
--- a/lsb-bootscripts/etc/init.d/udev
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/udev
-
-### BEGIN INIT INFO
-# Provides: udev
-# Required-Start:
-# Should-Start: modules
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Populated /dev with device nodes.
-# Description: Mounts a tempfs on /dev and starts the udevd daemon.
-# Device nodes are created as defined by udev.
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-MESSAGE="Populating /dev with device nodes..."
-
-case "${1}" in
- start)
- 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}
- $FAILURE_ACTION
- /etc/rc.d/init.d/halt stop
- fi
-
- # If not using DEVTMPFS 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 [ ${?} -ne 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}
- $FAILURE_ACTION
- /etc/rc.d/init.d/halt stop
- fi
-
- # Create a symlink for POSIX shared memory
- ln -s /run/shm /dev/shm
-
- # Udev handles uevents itself, so we don't need to have
- # the kernel call out to any binary in response to them
- # This is a failsafe and should be done in kernel config
- echo > /proc/sys/kernel/hotplug
-
- # Copy the only static device node that Udev >= 155 doesn't
- # handle to /dev (handled by default with DEVTMPFS)
- if [ ! -f /dev/null ]; then
- cp -a /lib/udev/devices/null /dev
- fi
-
- # 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 --type=subsystems
- /sbin/udevadm trigger --action=add --type=devices
-
- # Now wait for udevd to process the uevents we triggered
- /sbin/udevadm settle
- evaluate_retval standard
- ;;
-
- *)
- echo "Usage ${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/udev
diff --git a/lsb-bootscripts/etc/init.d/udev_retry b/lsb-bootscripts/etc/init.d/udev_retry
deleted file mode 100644
index b9e7da8da..000000000
--- a/lsb-bootscripts/etc/init.d/udev_retry
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-# Begin $RC_BASE/init.d/udev_retry
-
-### BEGIN INIT INFO
-# Provides: udev_retry
-# Required-Start: udev
-# Should-Start: $local_fs
-# Required-Stop:
-# Should-Stop:
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Replays failed uevents and creates additonal devices.
-# Description: Replays any failed uevents that were skipped due to
-# slow hardware initialization, and creates those needed
-# device nodes
-# X-LFS-Provided-By: LFS
-### END INIT INFO
-
-. /lib/lsb/init-functions
-
-MESSAGE="Retrying failed uevents, if any..."
-
-case "${1}" in
- start)
-
- # 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 standard
- ;;
-
- *)
- echo "Usage ${0} {start}"
- exit 1
- ;;
-esac
-
-# End $RC_BASE/init.d/udev_retry