aboutsummaryrefslogtreecommitdiff
path: root/scripts/modules_load.sh.in
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-11-05 15:28:18 +0100
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-11-05 16:11:47 +0100
commit021fa432447bd7b447ca39738040698db39d751b (patch)
tree66c0e46dfd952ce6de6043916f3eb9e2d92e62e2 /scripts/modules_load.sh.in
Initial commitv1
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'scripts/modules_load.sh.in')
-rw-r--r--scripts/modules_load.sh.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/modules_load.sh.in b/scripts/modules_load.sh.in
new file mode 100644
index 0000000..58bb2ab
--- /dev/null
+++ b/scripts/modules_load.sh.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+MODLIST="@ETCPATH@/modules"
+
+if [ ! -f "$MODLIST" ]; then
+ exit 0
+fi
+
+while read LINE;
+do
+ trimmed=`echo -- $LINE`
+ [ ! -z "$trimmed" ] || continue
+ set $trimmed
+
+ case "$1" in
+ \#*)
+ ;;
+ *)
+ modprobe "$1"
+ ;;
+ esac
+done < "$MODLIST"