27 lines
667 B
Bash
27 lines
667 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
LOAD_DIR="/etc/modules-load.d"
|
||
|
MODULES="$(ls $LOAD_DIR)"
|
||
|
|
||
|
case "${1}" in
|
||
|
start)
|
||
|
for MOD in $MODULES;
|
||
|
do
|
||
|
while read module args;
|
||
|
do
|
||
|
# Ignore comments and blank lines
|
||
|
case "$module" in
|
||
|
""|"#"*) continue;;
|
||
|
esac
|
||
|
|
||
|
modprobe ${module} ${args}
|
||
|
done < $LOAD_DIR/$MOD
|
||
|
done
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: ${0} {start}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|