summaryrefslogtreecommitdiff
path: root/modutils/files/modutils.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/files/modutils.sh')
-rw-r--r--modutils/files/modutils.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/modutils/files/modutils.sh b/modutils/files/modutils.sh
index e69de29bb2..a89d8e4141 100644
--- a/modutils/files/modutils.sh
+++ b/modutils/files/modutils.sh
@@ -0,0 +1,17 @@
+[ -f /proc/modules ] || exit 0
+[ -e /sbin/depmod ] || exit 0
+
+[ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
+depmod -Ae
+
+[ "$VERBOSE" != no ] && echo -n "Loading modules: "
+(cat /etc/modules; echo; ) |
+while read module args
+do
+ case "$module" in
+ \#*|"") continue ;;
+ esac
+ [ "$VERBOSE" != no ] && echo -n "$module "
+ modprobe $module $args
+done
+[ "$VERBOSE" != no ] && echo