|
Revision 43, 1.0 KB
(checked in by root, 6 years ago)
|
|
Need to place these somewhere.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #! /bin/sh |
|---|
| 2 | # /etc/init.d/modutils: loads the appropriate modules in `boot'. |
|---|
| 3 | # (Nicked from debian) |
|---|
| 4 | |
|---|
| 5 | PATH="/sbin:/bin" |
|---|
| 6 | |
|---|
| 7 | [ -f /proc/ksyms ] || exit 0 |
|---|
| 8 | [ -e /sbin/depmod ] || exit 0 |
|---|
| 9 | |
|---|
| 10 | if touch /lib/modules/$(uname -r)/modules.dep 2>/dev/null; then |
|---|
| 11 | echo -n "Calculating module dependencies..." |
|---|
| 12 | depmod -A -q |
|---|
| 13 | echo "done." |
|---|
| 14 | else |
|---|
| 15 | if [ ! -e /lib/modules/$(uname -r)/ ] ; then |
|---|
| 16 | echo "WARNING: No modules present for current kernel!" |
|---|
| 17 | else |
|---|
| 18 | echo "Not calculating module dependencies: /lib/modules/$(uname -r) is read only." |
|---|
| 19 | fi |
|---|
| 20 | fi |
|---|
| 21 | |
|---|
| 22 | # Loop over every line in /etc/modules. |
|---|
| 23 | echo -n 'Loading modules: ' |
|---|
| 24 | (cat /etc/modules; echo) | # make sure there is a LF at the end |
|---|
| 25 | while read module args |
|---|
| 26 | do |
|---|
| 27 | case "$module" in |
|---|
| 28 | \#*|"") continue ;; |
|---|
| 29 | esac |
|---|
| 30 | echo -n "$module " |
|---|
| 31 | modprobe $module $args |
|---|
| 32 | done |
|---|
| 33 | echo |
|---|
| 34 | |
|---|
| 35 | # |
|---|
| 36 | # Just in case a sysadmin prefers generic symbolic links in |
|---|
| 37 | # /lib/modules/boot for boot time modules we will load these modules |
|---|
| 38 | # |
|---|
| 39 | if [ -n "`modprobe -l -t boot`" ] |
|---|
| 40 | then |
|---|
| 41 | modprobe -a -t boot \* |
|---|
| 42 | fi |
|---|
| 43 | |
|---|
| 44 | exit 0 |
|---|
| 45 | |
|---|