aboutsummaryrefslogtreecommitdiffstats
path: root/lsb-bootscripts/etc/init.d/modules
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/modules
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/modules')
-rw-r--r--lsb-bootscripts/etc/init.d/modules97
1 files changed, 0 insertions, 97 deletions
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