diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/modutils/files/modutils.sh | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | poky-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-x | meta/packages/modutils/files/modutils.sh | 27 |
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 | |||
3 | LOAD_MODULE=modprobe | ||
4 | [ -f /proc/modules ] || exit 0 | ||
5 | [ -f /etc/modules ] || exit 0 | ||
6 | [ -e /sbin/modprobe ] || LOAD_MODULE=insmod | ||
7 | |||
8 | if [ ! -e /sbin/depmod ]; then | ||
9 | [ -f /lib/modules/`uname -r`/modules.dep ] || LOAD_MODULE=insmod | ||
10 | else | ||
11 | [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." | ||
12 | depmod -Ae | ||
13 | fi | ||
14 | |||
15 | [ "$VERBOSE" != no ] && echo -n "Loading modules: " | ||
16 | (cat /etc/modules; echo; ) | | ||
17 | while read module args | ||
18 | do | ||
19 | case "$module" in | ||
20 | \#*|"") continue ;; | ||
21 | esac | ||
22 | [ "$VERBOSE" != no ] && echo -n "$module " | ||
23 | eval "$LOAD_MODULE $module $args >/dev/null 2>&1" | ||
24 | done | ||
25 | [ "$VERBOSE" != no ] && echo | ||
26 | |||
27 | exit 0 | ||