meta-blackfinn/recipes-core/busybox/files/S20load_modules.sh

27 lines
667 B
Bash
Raw Normal View History

2020-01-23 17:58:15 +00:00
#!/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