root/floppyfw-3.0/devkitstuff/S25modutils

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
5PATH="/sbin:/bin"
6
7[ -f /proc/ksyms ] || exit 0
8[ -e /sbin/depmod ] || exit 0
9
10if touch /lib/modules/$(uname -r)/modules.dep 2>/dev/null; then
11        echo -n "Calculating module dependencies..."
12        depmod -A -q
13        echo "done."
14else
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
20fi
21
22# Loop over every line in /etc/modules.
23echo -n 'Loading modules: '
24(cat /etc/modules; echo) | # make sure there is a LF at the end
25while read module args
26do
27        case "$module" in
28                \#*|"") continue ;;
29        esac
30        echo -n "$module "
31        modprobe $module $args
32done
33echo
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#
39if [ -n "`modprobe -l -t boot`" ]
40then
41        modprobe -a -t boot \*
42fi
43
44exit 0
45
Note: See TracBrowser for help on using the browser.