summaryrefslogtreecommitdiffstats
path: root/meta/packages/modutils/files/modutils.sh
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/modutils/files/modutils.sh
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/modutils/files/modutils.sh')
-rwxr-xr-xmeta/packages/modutils/files/modutils.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/packages/modutils/files/modutils.sh b/meta/packages/modutils/files/modutils.sh
new file mode 100755
index 0000000000..89281276fd
--- /dev/null
+++ b/meta/packages/modutils/files/modutils.sh
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3LOAD_MODULE=modprobe
4[ -f /proc/modules ] || exit 0
5[ -f /etc/modules ] || exit 0
6[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
7
8if [ ! -e /sbin/depmod ]; then
9 [ -f /lib/modules/`uname -r`/modules.dep ] || LOAD_MODULE=insmod
10else
11 [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
12 depmod -Ae
13fi
14
15[ "$VERBOSE" != no ] && echo -n "Loading modules: "
16(cat /etc/modules; echo; ) |
17while read module args
18do
19 case "$module" in
20 \#*|"") continue ;;
21 esac
22 [ "$VERBOSE" != no ] && echo -n "$module "
23 eval "$LOAD_MODULE $module $args >/dev/null 2>&1"
24done
25[ "$VERBOSE" != no ] && echo
26
27exit 0